nfsantos opened a new pull request, #1511:
URL: https://github.com/apache/jackrabbit-oak/pull/1511

   Microbenchmarks:
   Adapted from JsopStreamTest:
   
   ```
   public static void main(String... args) {
       for (int k = 0; k < 5; k++) {
           String s = "Hello \"World\" Hello \"World\" Hello \"World\" Hello 
\"World\" Hello \"World\" Hello \"World\" ";
           StopWatch timer = new StopWatch();
           JsopBuilder w = new JsopBuilder() ;
           for (int i = 0; i < 50000000; i++) {
               w.value(s);
               if (i % 100 == 0) {
                   w.resetWriter();
               }
           }
           System.out.println(w.getClass() + ": " + timer.seconds());
       }
   }
   ```
   
   
   Base line:
   ```
   class org.apache.jackrabbit.oak.commons.json.JsopBuilder: 9.27 seconds
   class org.apache.jackrabbit.oak.commons.json.JsopBuilder: 9.19 seconds
   class org.apache.jackrabbit.oak.commons.json.JsopBuilder: 9.21 seconds
   class org.apache.jackrabbit.oak.commons.json.JsopBuilder: 9.23 seconds
   class org.apache.jackrabbit.oak.commons.json.JsopBuilder: 9.20 seconds
   ```
   
   Optimized StringBuilder. value(String)
   ```
   class org.apache.jackrabbit.oak.commons.json.JsopBuilder: 8.09 seconds
   class org.apache.jackrabbit.oak.commons.json.JsopBuilder: 8.04 seconds
   class org.apache.jackrabbit.oak.commons.json.JsopBuilder: 8.12 seconds
   class org.apache.jackrabbit.oak.commons.json.JsopBuilder: 8.22 seconds
   class org.apache.jackrabbit.oak.commons.json.JsopBuilder: 8.16 seconds


-- 
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: dev-unsubscr...@jackrabbit.apache.org

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

Reply via email to