arthurnn / memcached

A Ruby interface to the libmemcached C client
Academic Free License v3.0
432 stars 125 forks source link

Marshal vs Yajl #30

Closed paulbellamy closed 13 years ago

paulbellamy commented 13 years ago

Hey Evan, Based on some benchmarks I've done, and the Yajl page, it seems that Yajl is considerably faster than Marshal. Have you looked at replacing Marshal with Yajl? If so, what are your thoughts on that?

(the Yajl gem can be found here: https://github.com/brianmario/yajl-ruby)

Thanks, Paul

paulbellamy commented 13 years ago

Bah, disregard this. Yajl can't really re-consitute Ruby objects like Marshal can.

evan commented 13 years ago

Yeah, it's not general purpose. However, I would support adding a subclass that could do pluggable serialization (not sure what performance degradation adding it at the top level would cause, would be worth testing).