You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@cassandra.apache.org by GitBox <gi...@apache.org> on 2019/11/16 01:46:55 UTC

[GitHub] [cassandra] yifan-c commented on issue #382: Improve strings encoding speed and add benchmarks

yifan-c commented on issue #382: Improve strings encoding speed and add benchmarks
URL: https://github.com/apache/cassandra/pull/382#issuecomment-554591540
 
 
   Based on [Aleksey's comment](https://issues.apache.org/jira/browse/CASSANDRA-15410?focusedCommentId=16975077&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-16975077), a new write string method only for ASCII was added. 
   
   The latest benchmark shows similar performance between `writeLongTextAsASCII` and `writeLongTextWithExactSizeSkipCalc`
   
   ```
   [java] Benchmark                                               Mode  Cnt    Score    Error  Units
   [java] StringsEncodeBench.writeLongText                        avgt    6  570.920 ± 21.376  ns/op
   [java] StringsEncodeBench.writeLongTextAsASCII                 avgt    6  291.466 ±  9.508  ns/op
   [java] StringsEncodeBench.writeLongTextWithExactSize           avgt    6  467.222 ± 25.140  ns/op
   [java] StringsEncodeBench.writeLongTextWithExactSizeSkipCalc   avgt    6  285.320 ± 10.883  ns/op
   [java] StringsEncodeBench.writeShortText                       avgt    6   62.076 ±  2.107  ns/op
   [java] StringsEncodeBench.writeShortTextAsASCII                avgt    6   32.121 ±  0.403  ns/op
   [java] StringsEncodeBench.writeShortTextWithExactSize          avgt    6   41.929 ±  1.783  ns/op
   [java] StringsEncodeBench.writeShortTextWithExactSizeSkipCalc  avgt    6   34.638 ±  0.455  ns/op
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@cassandra.apache.org
For additional commands, e-mail: pr-help@cassandra.apache.org