-
Notifications
You must be signed in to change notification settings - Fork 525
STATIC_MODE seems to be SLOWER then DYNAMIC_MODE #197
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
can you provide a benchmark to reproduce? |
I created a new repo https://github.com/mburger81/jsoniter-test where I have invited you to be a collaborator. I tested this scenario where I created a new Pojo class and serialize it 1000000 times This is my benchmark result
As you can see in this case it seems the static mode is the fastest one, nearly the same as dynamic mode. I have the big problem we have to serialize json on a embeded system and nee much performance as possible. On another test on another project we did before, the static mode was slower it could be we did something wrong there. Having a look there seems to be a -30% comparing to reflection, is that what we can expect? |
I confirm making similar observation. We ran some comparison tests and found that STATIC mode is somewhat slower than DYNAMIC. The warmup is definitely much slower for STATIC. Quite strange results. |
Try using JMH to benchmark.
…On Wed, Mar 13, 2019 at 3:32 AM patrushev ***@***.***> wrote:
I confirm making similar observation. We ran some comparison tests and
found that STATIC mode is somewhat slower than DYNAMIC. The warmup is
definitely much slower for STATIC. Quite strange results.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#197 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AACeXbB61kfW5G5alpYhFoBBm0TsuAn9ks5vWADHgaJpZM4VWhgK>
.
|
Hey, we tested your demo example in java and doing some benchmark tests, with your example it seems the STATIC_MODE which should be the fastest mode is much more slower then the DYNAMIC_MODE.
If we loop it thorugh 10000+ times we se a bug performance difference.
Also we noticed your documentation seems on some buggy.
The text was updated successfully, but these errors were encountered: