On Tue, 16 Aug 2022 23:15:38 GMT, SWinxy <[email protected]> wrote:

>> ScientificWare has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Removes whitespace.
>>   
>>   Remove a whitespace at the end of the file
>
> That's a bit sus for the enhanced switch statement to be significantly slower 
> (7.5x more time than the map). Your methodology still shows that you aren't 
> creating new objects for each invocation and returning the same objects each 
> time. Is that accurate to your performance table?

@SWinxy All my apologies, I skipped testing CASE + RGB implementation. I posted 
it but not tested (previous results were about CASE + Hex.
I updated my  table including your workaround suggestion.
- The results of CASE + RGB are still under Map.
- But Map + your workaround gives good results.

All the stringToColor codes are available, feel free to make a test.

-------------

PR: https://git.openjdk.org/jdk/pull/9825

Reply via email to