-
Type:
Improvement
-
Resolution: Done
-
Priority:
Major - P3
-
Affects Version/s: 1.0.8
-
Component/s: None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
-
None
Two major changes.
1. The fast_pack function now lives up to its name. Instead of constantly cat'ing data and reallocating buffers, the buffer is allocated once and data is safely copied in. A string is created once at the very end.
2. All uses of RARRAY_PTR were replaced with calls to rb_ary_entry(). This C API function is present on 1.8.7, 1.9.x and Rubinius. Using this instead of RARRAY_PTR prevents a lot of cache copying and flushing for Rubinius.
Performance under MRI was slightly improved when tested with bin/standard_benchmark. Improvement was approximately 5% for serializing/deserializing LARGE objects.