Forum: Ruby Localmemcache-0.0.1, efficiently sharing a Hashtable on a local Unix machine

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D71284e011fc1db85804d55515f7d5b8?d=identicon&s=25 Sven C. Koehler (Guest)
on 2009-03-07 13:25
(Received via mailing list)
Hi,

today I am releasing the very first version of localmemcache (version
0.0.1).
Localmemcache is a library written in C that offers efficient sharing of
a
hashtable between processes on a local Unix machine by taking advantage
of
shared memory.  Its Ruby binding aims to be similar to that of the
MemCache
Ruby bindings.

* http://localmemcache.rubyforge.org/

EXAMPLE
=======

require 'localmemcache'
$lm = LocalMemCache.new :namespace => "viewcounters"
$lm[:foo] = 1
$lm[:foo]
$lm.delete(:foo)

PERFORMANCE
===========

Here's a quick speed comparison, made on an
Intel(R) Xeon(R) CPU E5205 @ 1.86GHz:

Benchmark pseudo code:

2_000_000.times {
  index = rand(10000).to_s
  $hash.set(index, index)
  $hash.get(index)
}

MemCache:      253326.122 ms
LocalMemCache: 6055.552 ms
Ruby's Hash:   4963.313 ms

So in this example localmemcache is about 40 times faster than using
memcache
locally, and about 20% slower than Ruby's hash.

INSTALL
=======

# gem install localmemcache

CONTACT
=======

Please contact me with bugs, suggestions and patches at: schween + snafu
# de

LINKS
=====

Localmemcache: http://localmemcache.rubyforge.org/
Rubyforge project: http://localmemcache.rubyforge.org/

Source code is hosted on github: http://github.com/sck/localmemcache/

Best,

Sven C. Koehler

localmemcache-0.0.1.gem 251971dd68451656d756b8bd1abe5879
This topic is locked and can not be replied to.