Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

updated to_msgpack() implementation #19

Merged
merged 1 commit into from

2 participants

@frsyuki

This patch improves to_msgpack implementations in test/perf_simple.rb and test/perf_strict.rb.

And here is a benchmark result that shows different result than the current README.md:
https://gist.github.com/2692477

@ohler55
Owner

Great, thanks. I'll regenerate the tests at home tonight and update the readme. It looks like I need to see what broke on the dump functionality. It became slower at some point.

@ohler55 ohler55 merged commit 52899a4 into ohler55:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 14, 2012
  1. @frsyuki
This page is out of date. Refresh to see the latest.
Showing with 4 additions and 4 deletions.
  1. +2 −2 test/perf_simple.rb
  2. +2 −2 test/perf_strict.rb
View
4 test/perf_simple.rb
@@ -39,8 +39,8 @@ def to_hash()
'hash' => @hash,
}
end
- def to_msgpack(out)
- out << MessagePack.pack(to_hash())
+ def to_msgpack(out='')
+ to_hash().to_msgpack(out)
end
end
View
4 test/perf_strict.rb
@@ -50,8 +50,8 @@ def to_hash()
end
alias as_json to_hash
- def to_msgpack(out)
- out << MessagePack.pack(to_hash())
+ def to_msgpack(out='')
+ to_hash().to_msgpack(out)
end
def self.json_create(h)
Something went wrong with that request. Please try again.