small medium large xlarge

Generic-user-small
15 Aug 2016, 04:47
Ruben Davila Santos (1 post)

Hi,

I’m using the output of the scripts in Chapter 1 as the source for the data.csv file which generated a file of 955 MB for me.

When I run the script, it takes more than 1 minutes to finish (in a modern MBP) and the output is the following:

With GC

{:TOTAL=>3853500, :FREE=>526383, :T_OBJECT=>56, :T_CLASS=>585, :T_MODULE=>42, :T_FLOAT=>9, :T_STRING=>3103793, :T_REGEXP=>94, :T_ARRAY=>200869, :T_HASH=>49, :T_STRUCT=>5, :T_BIGNUM=>2, :T_FILE=>5, :T_DATA=>1270, :T_MATCH=>19555, :T_COMPLEX=>1, :T_RATIONAL=>1, :T_NODE=>732, :T_ICLASS=>49}

{:TOTAL=>3853500, :FREE=>643631, :T_OBJECT=>56, :T_CLASS=>585, :T_MODULE=>42, :T_FLOAT=>9, :T_STRING=>3006093, :T_REGEXP=>94, :T_ARRAY=>200869, :T_HASH=>54, :T_STRUCT=>5, :T_BIGNUM=>2, :T_FILE=>5, :T_DATA=>1271, :T_MATCH=>2, :T_COMPLEX=>1, :T_RATIONAL=>1, :T_NODE=>731, :T_ICLASS=>49}

{"2.2.4":{"gc":"enabled","time":67.82,"gc_count":145,"memory":"2917 MB"}}

Without GC

{:TOTAL=>10919294, :FREE=>113, :T_OBJECT=>56, :T_CLASS=>585, :T_MODULE=>42, :T_FLOAT=>9, :T_STRING=>9308017, :T_REGEXP=>103, :T_ARRAY=>302148, :T_HASH=>66, :T_STRUCT=>5, :T_BIGNUM=>2, :T_FILE=>8, :T_DATA=>1382, :T_MATCH=>1100006, :T_COMPLEX=>1, :T_RATIONAL=>1, :T_NODE=>206701, :T_ICLASS=>49}

{:TOTAL=>10919294, :FREE=>42, :T_OBJECT=>56, :T_CLASS=>585, :T_MODULE=>42, :T_FLOAT=>9, :T_STRING=>9308084, :T_REGEXP=>103, :T_ARRAY=>302148, :T_HASH=>69, :T_STRUCT=>5, :T_BIGNUM=>2, :T_FILE=>8, :T_DATA=>1383, :T_MATCH=>1100006, :T_COMPLEX=>1, :T_RATIONAL=>1, :T_NODE=>206701, :T_ICLASS=>49}

{"2.2.4":{"gc":"disabled","time":65.79,"gc_count":0,"memory":"3376 MB"}}

This differs a lot of the results shown on the book:

$ ruby -I . wrapper_example.rb

{"2.2.0":{"gc":"enabled","time":14.96,"gc_count":27,"memory":"479 MB"}}

$ ruby -I . wrapper_example.rb --no-gc

{"2.2.0":{"gc":"disabled","time":10.17,"gc_count":0,"memory":"1555 MB"}}
Generic-user-small
30 Aug 2016, 13:55
Radoslaw Bulat (4 posts)

For me running command ruby wrapper_example.rb generates output.csv file about 25MB size. What is the size your of data.csv file? It should be 25MB.

You must be logged in to comment