Currently we need 16 bytes to create a ScriptFunction in bytecode: new ScriptFunctionImpl dup getstatic Script$f.constants : [Object; iconst_1 aaload checkcast RecompilableScriptFunctionData aload_2 invokespecial ScriptFunctionImpl.<init>(RecompilableScriptFunctionData;ScriptObject;)V This can be reduced to 8 by introducing a factory method ScriptFunctionImpl.create(Object[] constants, int index, ScriptObject scope): getstatic Script$f.constants : [Object; iconst_1 aload 2 invokestatic ScriptFunctionImpl.create([Object;IScriptObject;)ScriptFunction; For methods containing lots of function declarations (e.g. typically the top-level program) this is a significant reduction in bytecode size.