Mark Wielaard wrote:

 > Another solution would be to encode the values in CharData not as
 > Strings but as actual char[] but that might be a lot less efficient
 > (source code may explode I mean, it shouldn't matter for the class
 > file).

Just the opposite IMHO. Source would be not longer, at least not much, 
class file on other hand would be a lot, lot larger. Instead of using 
utf8 for 16bits (2-3 bytes per entry), in bytecode it would equal to

aload_n
sipush index
sipush value
castore

which is 8 bytes. If we would use integers, it is more or less the same 
- instead of sipush value, ldc constant_index would be used, plus extra 
space in class file constants pool.

Artur


_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to