Skip to content
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

Benchmark improvement #7

Open
paya-cz opened this issue Feb 10, 2018 · 1 comment
Open

Benchmark improvement #7

paya-cz opened this issue Feb 10, 2018 · 1 comment

Comments

@paya-cz
Copy link

paya-cz commented Feb 10, 2018

Seems to me like you are running the benchmarks without first JITting the libraries/benchmark code. I recommend running a throwaway repeat=1 RunLoop over all your factory methods before running the real benchmark. Gives you a lot more accurate results, as JIT time or library initialization time should not really be a factor.

Anyway seems like Revenj managed to beat Jil. Did you have to cut corners and you may not be able to parse all "exotic" jsons, handle encodings/escaping etc?

@zapov
Copy link
Member

zapov commented Feb 10, 2018

It's done like that on purpose to include startup overhead, which can be quite a different for different libraries. Revenj for example, does analysis during compilation, so it's only the JIT compilation, not the type analysis.
Also, on mobile it's quite common to only do a single processing without any warmup, so the most common server scenarios are not the only relevant scenarios.

Well, 4 years ago when this was built Revenj did a lot more than others (with the exception of Newtonsoft) and it was the only one which didn't fail on even "standard" types. I did not improve it much since then, so it doesn't do runtime analysis - it falls back to other library in that case.
I did improve Java version... which now even has runtime analysis part built in.

So there was not really cutting corners, just avoiding GC, working on low levels and writing custom type encoders instead of relying on String conversion or built in ones.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants