review request for 6798511/6860431: Include functionality of Surrogate in Character
Ulf Zibis
Ulf.Zibis at gmx.de
Fri Mar 19 21:46:29 UTC 2010
Am 16.03.2010 23:35, schrieb Xueming Shen:
> Martin Buchholz wrote:
>>
>> The primary theory here is that branches are expensive,
>> and we are reducing them by one.
>>
>
> There are still two branches in new impl, if you count the "ifeq" and
> "if_icmpge"(?)
>
> We are trying to "optimize" this piece of code with the assumption
> that the new impl MIGHT help certain vm (hotspot?)
> to optimize certain use scenario (some consecutive usages), if the
> compiler and/or the vm are both smart enough at certain
> point, with no supporting benchmark data?
I've finished the benchmark:
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/JDK-7/j_l_Character_charCount/src/java/lang/CharacterBenchmark.java?rev=1006&view=log
The results:
time1: 2316,213 ms ..à la Martin
time2: 1267,063 ms
time3: 1245,972 ms ..using isValidCodePoint
time4: 1467,570 ms ..validate version (slower, because of
unreasonable HotSpot optimizing, see "C2 optimization bug ?" in
hotspot-compiler-dev list)
Here see the disassembly snippets:
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/JDK-7/j_l_Character_charCount/log/PA_Character_compare.txt?rev=1007&view=markup
Detailed:
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/JDK-7/j_l_Character_charCount/log/PA_Character.xml?rev=1006&view=markup
Little NetBeans project:
https://java-nio-charset-enhanced.dev.java.net/source/browse/java-nio-charset-enhanced/branches/JDK-7/j_l_Character_charCount/
Now I have two patches in my mq queue.
Martin, how do I create 2 exports in the form, you would like?
Should I use hg export with some magic option?
-Ulf
More information about the core-libs-dev
mailing list