-
Notifications
You must be signed in to change notification settings - Fork 5
InputStream test. Updated readme. #3
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
Conversation
|
Hi there! I'd be happy to update the changes, minus result updates -- I can re-run them once everything works, but I don't want to include results that I did not run myself, at least on README. |
|
Actually moving results from README makes sense in general, easier to update, add visualizations etc. |
|
Np. Gl hf ;) |
Add missing test for reading off InputStream. Updated DSL-JSON to v1.0
|
btw. I think you should change read test base to consume hashCode instead of the returned instance This will force your lazy Map to actually build the structure instead of just faking it. |
|
@zapov I don't think I have any lazy maps; maybe you are thinking of Boon, which has a set of aggressive optimizations? I definitely agree that leaving lazy optimizations in effect is unfair and not indicative of actual performance. I'd be happy to change code to use |
|
@zapov thanks -- I hope to find time to look into this and other updates, and maybe get results updated. I don't want to have old information given changes and inclusion of many fast(er) implementations. |
|
I'm pretty sure it was Jackson which was like 10x faster than others. When I added hashCode, it went down to like 20% faster than others. I didn't debug it for the actual cause, but I took a look at Jackson code and saw that DeferredMap. I see now that it's behind a flag, so I'm not sure anymore why that might be possible. I'll take a look again, hopefully soon ;) |
|
@zapov Ok: if it's with Jackson I'll be happy to change that as well, I just can't think of a place off the top of my head. :-D It could be within |
|
btw. the results I'm talking about are: Benchmark Mode Cnt Score Error Units with consume of hashCode DZoneReadMapBoon.read100kFromStream thrpt 9 1.384 ± 0.068 ops/s Lazy map seemed like an obvious culprit. If you find out what it was, let me know. Otherwise I'll have to dig into it myself and see what it was. |
|
@zapov It looks like 2 impls that may indeed be using lazy instantiation (Boon, Jackson-jr) have difference, so your guess is probably good one. I was just confused because standard Jackson does not have anything special handling as it builds Maps eagerly. WIll have a look at this later today. And also figure out how install mono etc. :) |
|
I still think either Jackson or JVM is doing something lazy with Maps since Jackson has 30-40% difference with or without hashCode() Did you managed to set everything up? Was it painful? |
|
That sounds... worrisome ;( I though setting up Mono should be a no brainer. There is installer for Mac and Linux has it through apt-get. As for the fix, yeah I did saw that, but here is still 10% difference with/without hashCode Not entirely sure if this is valid benchmark optimization, but I don't have strong objections to it at this point. Let me know if there is anything I can help you with regards to setting up Mono. I use this installer for Mac: http://www.mono-project.com/download/#download-mac I would love for you to finish up this bench and send it over to DZone ;) |
|
@zapov sorry for not following up on this -- I hope to find time to figure things out, blocker is lack of time and not so much problems. Write up for DZone sounds like a great idea. Also I think you may well be right wrt hash code: due to canonicalization (which is done at low level, regardless of what databinding does, unless explicitly disabled) |
Add missing test for reading off InputStream.
Updated DSL-JSON to v1.0
Updated README with latest run.