You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/04/19 06:40:57 UTC

[GitHub] [shardingsphere] lwclover commented on pull request #16913: NonaId faster and shorter than uuid

lwclover commented on PR #16913:
URL: https://github.com/apache/shardingsphere/pull/16913#issuecomment-1102151645

   > It it better to perform a JMH test to compare UUID generated by ThreadLocalRandom with NanoId.
   
   <html>
   <body>
   <!--StartFragment--><div class="okr-block-clipboard" data-okr="%7B%22okrDelta%22%3A%5B%7B%22lineType%22%3A%22unsupport%22%2C%22lineOptions%22%3A%7B%7D%2C%22lineContent%22%3A%5B%5D%7D%5D%2C%22businessKey%22%3A%22lark-doc%22%7D"></div><div data-zone-id="0" data-line-index="0" style="white-space: pre;">
   
   Test case | nanoid(ms) | uuid(ms)
   -- | -- | --
   1 thread generate total 10000000 | 15252 | 12546
   1 thread generate total 10000000,and ThreadLocalRandom optimization | 3596 | 5824
   10 thread generate total 10000000 | 23909 | 15609
   10 thread generate total 10000000,and ThreadLocalRandom optimization | 4094 | 5521
   test environment:Linux version 3.10.0-1062.18.1.el7.x86_64,8c 16m  conclusion:Nanoid performs better than UUID when optimized using ThreadLocalRandom
   
   </div><!--EndFragment-->
   </body>
   </html>


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org