Issue #14080 has been reported by pbfein (Peter Fein).

----------------------------------------
Bug #14080: Performance issue with Marshall.dump and Array of Floats - 100x regression in 2.3.x
https://bugs.ruby-lang.org/issues/14080

* Author: pbfein (Peter Fein)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: ruby 2.3.3p222 (2016-11-21 revision 56859) [x86_64-darwin15]
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
I am using Marshall.dump on array of Floats with Ruby 2.3.3 (same issue in 2.3.5).  In our program with an Array size of 1M it seems to hang indefinitely.  I take it down to 100K Floats and it takes about 10 seconds.  My sample program loads an marshaled Array of 100K floats from the .data file and then dumps it again.   Benchmark from various rubies showing the 2.3.x regression from 1.9 and then fixed again in 2.4.2. 

$ rvm use 2.3.3
$ruby marshall_slow.rb
12.240000   0.040000  12.280000 ( 12.314731)

$rvm use 2.3.5
$ruby marshall_slow.rb
11.230000   0.030000  11.260000 ( 11.285143)

$ rvm use 1.9.3
$ ruby marshall_slow.rb
  0.110000   0.000000   0.110000 (  0.115007)

$ rvm use 2.4.2
$ ruby marshall_slow.rb
 0.090000   0.000000   0.090000 (  0.083619)





---Files--------------------------------
marshall_slow.rb (188 Bytes)
marshalled_floats.data.gz (878 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>