wei-spring / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

Improve the performance of UTF-8 decoding/encoding which is a major bottlneck #1341

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
This seems to be the main reason some test cases perform worse on the new VM 
e.g. Issue 1304. 
This just means not reaching the Objective-C character decoding logic and 
ideally doing everything in C e.g. like this: 
http://bjoern.hoehrmann.de/utf-8/decoder/dfa/
The relevant code is in 
java_lang_String_bytesToChars___byte_1ARRAY_int_int_java_lang_String_R_char_1ARR
AY in the UTF-8 portion. It should be optimized like the US-ASCII code path.

Original issue reported on code.google.com by shai.almog on 8 Feb 2015 at 2:13