Currently Character class uses byte table with 7 bytes per entry to
encode needed things. I consider changing it to 8-bytes pre entry - in
fact 4 x char.

Disadvantage:
- take one more byte per entry - will take 2kb more in memory (but at
the same time we gain space in some method's bytecode - with JIT it can
be something like 2kb :)

Advantages:
- toUpper/toLower and digit funs would run faster (direct char access
instead of two baloads and shifting)
- we gain additional 8 bits, which can be used to encode ready results
for more complicated methods like isWhitespace or IsJavaIdentifierPart -
currently they are branch show (dog slow).


Any objections ?

Artur

Reply via email to