Skip to content

@thejefflarson /bench.py
Created

Embed URL

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Clone in Desktop Download ZIP
Comparison between daybreak, redis and codernitydb
#!/usr/bin/env python
from CodernityDB.database import Database
db = Database('/tmp/c.db')
db.create()
for i in xrange(0, 50000):
db.insert(dict(i=i))
require 'daybreak'
db = Daybreak::DB.new '/tmp/d.db'
50_000.times {|i| db[i] = i }
$ time ruby bench.rb
real 0m1.963s
user 0m1.436s
sys 0m0.518s
$ time python bench.py
real 0m4.465s
user 0m3.472s
sys 0m0.970s
$ time ruby redis.rb
real 0m7.548s
user 0m4.075s
sys 0m1.380s
# Plain jane redis install, probably suspect
require "redis"
db = Redis.new
50_000.times {|i| db[i] = i }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.