Improve performance #1

Merged
merged 2 commits into from Oct 26, 2015

Projects

None yet

2 participants

@repeatedly
Contributor

Current implementation is good to read but too slow.
I modified code to improve performance and memory usage.

Here is a benchmark with http://www.genpaku.org/timemachine/timemachineu8j.txt.

master:

% RUBYLIB=./lib ruby benchmark.rb
                 user     system      total        real
segment      4.950000   0.030000   4.980000 (  4.995038)

With patch:

% RUBYLIB=./lib ruby benchmark.rb
                 user     system      total        real
segment      1.080000   0.010000   1.090000 (  1.092069)
@6
Owner
6 commented Oct 26, 2015

Thank you! This is great, I will bump the Rubygem version

@6 6 merged commit da93fb9 into 6:master Oct 26, 2015

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment