Writing nanobots using Java Assembly directly
Fragment of a discussion from Talk:Code Size
Jump to navigation
Jump to search
I've had some success using Proguard to shrink a few bytes off of microbots when they really need it - eg. Yatagan requires this. It usually does it by re-assigning variables into a slot that is no longer used - note that the actual java asm is not type-aware, so you can stick one type of object into the variable you previously used for a different type of variable. This means you can better re-use the initial few variables, which have lower codesize cost.
IMO you'll get better effective shrinking by exploring the library - for example, the pattern matcher nanos are all using string and substring indexOf functions, they would never have space to put all of the actual matching code in.
Skilgannon (talk)