Created
March 11, 2011 00:14
-
-
Save mmasaki/865233 to your computer and use it in GitHub Desktop.
Faster PStore
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% time ruby pstore_bench.rb | |
ruby pstore_bench.rb 1.40s user 0.29s system 99% cpu 1.693 total | |
% time ruby pstore_bench.rb | |
ruby pstore_bench.rb 1.81s user 0.23s system 100% cpu 2.036 total | |
% time ruby pstore_bench.rb | |
ruby pstore_bench.rb 1.82s user 0.38s system 100% cpu 2.192 total |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
% time ruby pstore_bench.rb | |
ruby pstore_bench.rb 2.29s user 2.65s system 71% cpu 6.955 total | |
% time ruby pstore_bench.rb | |
ruby pstore_bench.rb 2.15s user 2.42s system 72% cpu 6.314 total | |
% time ruby pstore_bench.rb | |
ruby pstore_bench.rb 2.52s user 2.48s system 71% cpu 7.033 total |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'pstore' | |
p = PStore.new("foo") | |
p.transaction { p["hoge"] = "hoge" } | |
10000.times do | |
p.transaction { p["hoge"] += "hoge" } | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment