Use outbufs in FileUtils.compare_stream
I propose using outbufs in FileUtils.compare_stream.
It will increase performance.
I executed the following code to performance test.
str = "hoge" * 100000000
a = StringIO.new(str)
b = StringIO.new(str)
The following are results of time command.
1.27s user 0.69s system 96% cpu 2.036 total
1.38s user 0.69s system 96% cpu 2.152 total
1.12s user 0.24s system 98% cpu 1.379 total
0.70s user 0.43s system 97% cpu 1.158 total
0.72s user 0.27s system 98% cpu 1.010 total
0.62s user 0.28s system 98% cpu 0.915 total
Patched ruby passes tests in test/fileutils.
#1 Updated by Ayumu AIZAWA about 5 years ago
- Status changed from Open to Closed
- % Done changed from 0 to 100