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
Oj is not always faster than MessagePack #18
Conversation
If you create a pull request for improving the way I use msgpack in the tests I will be very happy to merge the pull request. As it is now, you are using an older version of Ruby and I can not reproduce the tests results. I don't remember what machine I ran the tests on. I think it was a MacBook Air. I can update the tests and rerun on a iMac once that is done. I would be glad to rerun the tests then. BTW, nice work on msgpack. |
I created another pull request to improve the way to use msgpack: #19 And I ran the tests using the latest ruby, ruby-1.9.3-p194. Here is the result: |
new pull request takes precedence |
I ran the updated tests on a iMac 2.8GHz i7, OS X 10.7.3, Ruby 1.9.3-p194. The results are below. I'm not sure why there is a difference from what you got. I plan on seeing if I can improve the performance on the dump() still. I will update the README but I'd like to figure out why we get different results before I do.
|
I think the difference is within a margin of error. They show the same tendency. It's a known thing that it's difficult to measure meaningful difference using this kind of microbenchmarks because influence of nondeterministic factors such as GC or CPU cache is relatively large.
Since the environment you used is unknown, it's hard to investigate, but I guess following possibilities:
|
For Oj, Rubinius is supported but it does not perform as well as I have not optimized for the missing parts in Rubinius. The tests above used msgpack 0.4.7. You may have missed the environment, iMac 2.8GHz i7, OS X 10.7.3, Ruby 1.9.3-p194. I suppose, if you do not want to push it further we can just let it rest. If you want to tweak msgpack to make it faster I will hold off on publishing the revised results. |
Sorry, I found I misunderstood your comment "I'd like to figure out why we get different results before I do" as "I'd like to figure out why I got different results from the result I wrote to README.md, before I do." So, I just think the difference is within a margin of error. I mean both of our results are correct. They show the same tendency:
|
I run "test/perf_strict.rb" but it showed different result on my environment than yours.
Could you tell me your environment? I want to improve msgpack.
My environment is:
It showed same tendency on following environment: