Project

General

Profile

Actions

Bug #10761

closed

Marshal.dump 100% slower in 2.2.0 vs 2.1.5

Added by jenkoruby (David Jenkins) about 9 years ago. Updated about 9 years ago.

Status:
Closed
Assignee:
-
Target version:
-
[ruby-core:<unknown>]

Description

Calling Marshal.dump on a complex (nested) object 100 times shows the following:

2.1.5
user system total real
Marshal Dump 24.350000 0.250000 24.600000 ( 29.330294)

2.2.0
user system total real
Marshal Dump 50.450000 0.140000 50.590000 ( 52.268773)

To reproduce, put marshal_slow.rb and nested_ds.txt in same directory and run marshal_slow.rb.

I found that Marshal.dump only shows this kind of discrepancy on deeply nested objects. The nested_ds.txt file is a dump of an object that contained a collection of sub objects of the same type.


Files

nested_ds.txt (2.1 MB) nested_ds.txt Large file to populate object which in turn will be Marshal.dump'd jenkoruby (David Jenkins), 01/21/2015 05:08 AM
marshal_slow.rb (212 Bytes) marshal_slow.rb Code that runs benchmark on Marshal.dump jenkoruby (David Jenkins), 01/21/2015 05:12 AM
dataset_dump.txt (362 KB) dataset_dump.txt jenkoruby (David Jenkins), 01/21/2015 02:47 PM
better_slow_marshal.rb (239 Bytes) better_slow_marshal.rb jenkoruby (David Jenkins), 01/21/2015 02:48 PM
flonum-hash-fixup-r45384-v1@r49365.patch (2.21 KB) flonum-hash-fixup-r45384-v1@r49365.patch normalperson (Eric Wong), 01/21/2015 10:20 PM
Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0Like0