Rick

Rick
Rick

Tuesday, December 3, 2013

Here we go again... latest round of optimization JSON Boon

Boon now wins in every test. It was winning most, and now it is all. (There is only one more trick up my sleeve and then I am done with optimizations that I know how to do).

Dec 3rd (near midnight)
Boon optimization once more.... Now Boon wins in every category and by a fairly wide margin. Boon has four parser for different types of buffers and an index overlay parser. It can parse direct from CharSequence, CharacterBuffer, StringBuilder, String, byte[] and char[].
Preferred buffer test:
Name                 Time                                 File           Iterations
jackson              1,247                    actionLabel.json              100,000
gson                 1,080                    actionLabel.json              100,000
boon char sequence   710                      actionLabel.json              100,000
boon original        586                      actionLabel.json              100,000
boon ascii           867                      actionLabel.json              100,000
Boon Index Overlay    497                      actionLabel.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  boon char sequence, boon ascii,     gson,           jackson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              1,238                   citm_catalog.json                  100
gson                 760                     citm_catalog.json                  100
boon char sequence   927                     citm_catalog.json                  100
boon original        698                     citm_catalog.json                  100
boon ascii           785                     citm_catalog.json                  100
Boon Index Overlay    568                     citm_catalog.json                  100
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  gson,           boon ascii,     boon char sequence, jackson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              1,279                         medium.json              100,000
gson                 1,225                         medium.json              100,000
boon char sequence   885                           medium.json              100,000
boon original        790                           medium.json              100,000
boon ascii           1,333                         medium.json              100,000
Boon Index Overlay    657                           medium.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  boon char sequence, gson,           jackson,        boon ascii
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              257                             menu.json              100,000
gson                 258                             menu.json              100,000
boon char sequence   176                             menu.json              100,000
boon original        158                             menu.json              100,000
boon ascii           223                             menu.json              100,000
Boon Index Overlay    129                             menu.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  boon char sequence, boon ascii,     jackson,        gson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              450                             sgml.json              100,000
gson                 373                             sgml.json              100,000
boon char sequence   300                             sgml.json              100,000
boon original        277                             sgml.json              100,000
boon ascii           427                             sgml.json              100,000
Boon Index Overlay    222                             sgml.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  boon char sequence, gson,           boon ascii,     jackson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              81                             small.json              100,000
gson                 83                             small.json              100,000
boon char sequence   150                            small.json              100,000
boon original        37                             small.json              100,000
boon ascii           39                             small.json              100,000
Boon Index Overlay    21                             small.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  boon ascii,     jackson,        gson,           boon char sequence
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              2,189                         webxml.json              100,000
gson                 2,401                         webxml.json              100,000
boon char sequence   1,843                         webxml.json              100,000
boon original        1,650                         webxml.json              100,000
boon ascii           2,742                         webxml.json              100,000
Boon Index Overlay    1,285                         webxml.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  boon char sequence, jackson,        gson,           boon ascii
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              471                           widget.json              100,000
gson                 468                           widget.json              100,000
boon char sequence   365                           widget.json              100,000
boon original        300                           widget.json              100,000
boon ascii           455                           widget.json              100,000
Boon Index Overlay    242                           widget.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  boon char sequence, boon ascii     gson,           jackson
From byte array!
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson-object       1,300                    actionLabel.json              100,000
json-smart           941                      actionLabel.json              100,000
gson                 990                      actionLabel.json              100,000
boon original        617                      actionLabel.json              100,000
boon char sequence   679                      actionLabel.json              100,000
boon ascii           761                      actionLabel.json              100,000
Boon Index Overlay    521                      actionLabel.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  boon char sequence, boon ascii,     json-smart,     gson           jackson-object
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson-object       1,087                   citm_catalog.json                  100
json-smart           1,082                   citm_catalog.json                  100
gson                 843                     citm_catalog.json                  100
boon original        1,191                   citm_catalog.json                  100
boon char sequence   1,384                   citm_catalog.json                  100
boon ascii           754                     citm_catalog.json                  100
Boon Index Overlay    1,079                   citm_catalog.json                  100
Winner: boon ascii
order:       boon ascii,     gson,           Boon Index Overlay,   json-smart,     jackson-object, boon original,  boon char sequence
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson-object       1,054                         medium.json              100,000
json-smart           1,355                         medium.json              100,000
gson                 1,362                         medium.json              100,000
boon original        958                           medium.json              100,000
boon char sequence   1,029                         medium.json              100,000
boon ascii           1,356                         medium.json              100,000
Boon Index Overlay    820                           medium.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  boon char sequence, jackson-object, json-smart,     boon ascii     gson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson-object       229                             menu.json              100,000
json-smart           250                             menu.json              100,000
gson                 338                             menu.json              100,000
boon original        210                             menu.json              100,000
boon char sequence   226                             menu.json              100,000
boon ascii           233                             menu.json              100,000
Boon Index Overlay    172                             menu.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  boon char sequence, jackson-object, boon ascii,     json-smart,     gson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson-object       370                             sgml.json              100,000
json-smart           475                             sgml.json              100,000
gson                 530                             sgml.json              100,000
boon original        346                             sgml.json              100,000
boon char sequence   356                             sgml.json              100,000
boon ascii           400                             sgml.json              100,000
Boon Index Overlay    304                             sgml.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  boon char sequence, jackson-object, boon ascii,     json-smart,     gson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson-object       63                             small.json              100,000
json-smart           68                             small.json              100,000
gson                 163                            small.json              100,000
boon original        65                             small.json              100,000
boon char sequence   66                             small.json              100,000
boon ascii           36                             small.json              100,000
Boon Index Overlay    49                             small.json              100,000
Winner: boon ascii
order:       boon ascii,     Boon Index Overlay,   jackson-object, boon original,  boon char sequence, json-smart     gson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson-object       1,951                         webxml.json              100,000
json-smart           2,535                         webxml.json              100,000
gson                 2,699                         webxml.json              100,000
boon original        1,864                         webxml.json              100,000
boon char sequence   2,120                         webxml.json              100,000
boon ascii           2,735                         webxml.json              100,000
Boon Index Overlay    1,535                         webxml.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  jackson-objec,t boon char sequence, json-smart,     gson           boon ascii
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson-object       414                           widget.json              100,000
json-smart           544                           widget.json              100,000
gson                 578                           widget.json              100,000
boon original        385                           widget.json              100,000
boon char sequence   403                           widget.json              100,000
boon ascii           447                           widget.json              100,000
Boon Index Overlay    304                           widget.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay,   boon original,  boon char sequence, jackson-object, boon ascii,     json-smart     gson
With I/O in the same call area.
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              3,006                    actionLabel.json              100,000
gson                 2,602                    actionLabel.json              100,000
boon original        2,869                    actionLabel.json              100,000
boon char sequence   2,277                    actionLabel.json              100,000
boon ascii           1,732                    actionLabel.json              100,000
Boon Index Overlay    2,026                    actionLabel.json              100,000
Winner: boon ascii
order:       boon ascii     Boon Index Overlay   boon char sequence  gson           boon original  jackson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              1,472                   citm_catalog.json                  100
gson                 928                     citm_catalog.json                  100
boon original        919                     citm_catalog.json                  100
boon char sequence   1,142                   citm_catalog.json                  100
boon ascii           1,024                   citm_catalog.json                  100
Boon Index Overlay    798                     citm_catalog.json                  100
Winner: Boon Index Overlay
order:       Boon Index Overlay   boon original  gson           boon ascii     boon char sequence  jackson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              3,484                         medium.json              100,000
gson                 3,035                         medium.json              100,000
boon original        2,596                         medium.json              100,000
boon char sequence   2,681                         medium.json              100,000
boon ascii           2,548                         medium.json              100,000
Boon Index Overlay    2,327                         medium.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay   boon ascii     boon original  boon char sequence  gson           jackson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              2,167                           menu.json              100,000
gson                 1,894                           menu.json              100,000
boon original        1,739                           menu.json              100,000
boon char sequence   1,722                           menu.json              100,000
boon ascii           1,122                           menu.json              100,000
Boon Index Overlay    1,582                           menu.json              100,000
Winner: boon ascii
order:       boon ascii     Boon Index Overlay   boon char sequence  boon original  gson           jackson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              2,422                           sgml.json              100,000
gson                 2,063                           sgml.json              100,000
boon original        1,793                           sgml.json              100,000
boon char sequence   1,838                           sgml.json              100,000
boon ascii           1,325                           sgml.json              100,000
Boon Index Overlay    1,720                           sgml.json              100,000
Winner: boon ascii
order:       boon ascii     Boon Index Overlay   boon original  boon char sequence  gson           jackson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              1,870                          small.json              100,000
gson                 1,706                          small.json              100,000
boon original        1,476                          small.json              100,000
boon char sequence   1,570                          small.json              100,000
boon ascii           926                            small.json              100,000
Boon Index Overlay    1,399                          small.json              100,000
Winner: boon ascii
order:       boon ascii     Boon Index Overlay   boon original  boon char sequence  gson           jackson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              4,639                         webxml.json              100,000
gson                 4,393                         webxml.json              100,000
boon original        3,489                         webxml.json              100,000
boon char sequence   3,869                         webxml.json              100,000
boon ascii           4,293                         webxml.json              100,000
Boon Index Overlay    3,160                         webxml.json              100,000
Winner: Boon Index Overlay
order:       Boon Index Overlay   boon original  boon char sequence  boon ascii     gson           jackson
___________________________________________________________________________________
Name                 Time                                 File           Iterations
jackson              2,476                         widget.json              100,000
gson                 2,140                         widget.json              100,000
boon original        1,858                         widget.json              100,000
boon char sequence   1,918                         widget.json              100,000
boon ascii           1,336                         widget.json              100,000
Boon Index Overlay    1,742                         widget.json              100,000
Winner: boon ascii
order:       boon ascii     Boon Index Overlay   boon original  boon char sequence  gson           jackson
___________________________________________________________________________________
Not too bad.

No comments:

Post a Comment

Kafka and Cassandra support, training for AWS EC2 Cassandra 3.0 Training