ohler55 / oj

Optimized JSON
http://www.ohler.com/oj
MIT License
3.12k stars 250 forks source link

Refactor converting number to string by using optimized function #886

Closed Watson1978 closed 1 year ago

Watson1978 commented 1 year ago

Refactor converting number to string by using optimized function which introduced at https://github.com/ohler55/oj/pull/879

ohler55 commented 1 year ago

Before merging, is the performance the same or better with this change?

Watson1978 commented 1 year ago

Sorry for late reply.

When I run benchmark with same code in https://github.com/ohler55/oj/pull/879, it is 0.8% slower by this PR.

I believe it is a tolerance error.

Before

Warming up --------------------------------------
             Oj.dump   431.211k i/100ms
Calculating -------------------------------------
             Oj.dump      4.323M (± 0.7%) i/s -     21.992M in   5.087412s

After

Warming up --------------------------------------
             Oj.dump   425.450k i/100ms
Calculating -------------------------------------
             Oj.dump      4.288M (± 0.3%) i/s -     21.698M in   5.060483s