Skip to content

Commit

Permalink
Don't allocate arrays for every table
Browse files Browse the repository at this point in the history
Wow, this was incredibly dumb
  • Loading branch information
SquidDev committed Jan 13, 2020
1 parent 9c32acd commit 7c0243e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/org/squiddev/cobalt/LuaTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,8 @@
* @see LuaValue
*/
public final class LuaTable extends LuaValue {
private Object[] EMPTY_ARRAY = new Object[0];
private Node[] EMPTY_NODES = new Node[0];
private static final Object[] EMPTY_ARRAY = new Object[0];
private static final Node[] EMPTY_NODES = new Node[0];
private static final LuaString N = valueOf("n");

private Object[] array = EMPTY_ARRAY;
Expand Down

0 comments on commit 7c0243e

Please sign in to comment.