[MacRuby] #1116: Yet another String performance issue
#1116: Yet another String performance issue ----------------------------------+----------------------------------------- Reporter: yasuimao@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Another String performance issue. Tested on a text file with 4360 lines (\n). {{{ Test 1 - File.read("test.txt").split(/\n/) Test 2 - File.read("test.txt").split("\n") Test 1 - force_encoding - File.read("test.txt").force_encoding("UTF- 16BE").split(/\n/) Test 2 - force_encoding - File.read("test.txt").force_encoding("UTF- 16BE").split("\n".force_encoding("UTF-16BE")) Test 3 - File.read("test.txt").lines {} }}} {{{ Ruby 1.8.7 Test 1 - 0.0081 0.0078 0.0086 Test 2 - 0.0078 0.0079 0.0079 Test 3 - 0.0058 0.0053 0.0065 Ruby 1.9.2 Test 1 - 0.0089 0.0090 0.0089 Test 2 - 0.0035 0.0035 0.0035 Test 3 - 0.0036 0.0035 0.0035 MacRuby 0.8 2011/01/16 Test 1 - 0.026 0.039 0.023 Test 2 - 0.019 0.018 0.018 Test 3 - 0.023 0.020 0.026 MacRuby 0.9 2011/01/16 Test 1 - 0.021 0.021 0.021 Test 2 - 23.51 23.55 23.50 Test 3 - 23.43 23.38 23.35 MacRuby 0.9 2011/01/16 - force_encoding Test 1 - 0.015 0.015 0.015 Test 2 - 0.011 0.011 0.011 }}} -- Ticket URL: <http://www.macruby.org/trac/ticket/1116> MacRuby <http://macruby.org/>
#1116: Yet another String performance issue ----------------------------------+----------------------------------------- Reporter: yasuimao@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@…): I forgot to mention that the original text only included ASCII characters. -- Ticket URL: <http://www.macruby.org/trac/ticket/1116#comment:1> MacRuby <http://macruby.org/>
#1116: Yet another String performance issue ----------------------------------+----------------------------------------- Reporter: yasuimao@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by lsansonetti@…): I improved the performance of String#split and String#lines as of r5181. Can you retry? -- Ticket URL: <http://www.macruby.org/trac/ticket/1116#comment:2> MacRuby <http://macruby.org/>
#1116: Yet another String performance issue ----------------------------------+----------------------------------------- Reporter: yasuimao@… | Owner: lsansonetti@… Type: defect | Status: new Priority: blocker | Milestone: Component: MacRuby | Keywords: ----------------------------------+----------------------------------------- Comment(by yasuimao@…): I tested this with the latest nightly and now it is as fast as or slightly faster than 0.8! {{{ MacRuby 0.9 nightly 2011/01/18 Test 1 - 0.019 0.019 0.019 Test 2 - 0.015 0.015 0.015 Test 3 - 0.014 0.014 0.014 }}} This is great! -- Ticket URL: <http://www.macruby.org/trac/ticket/1116#comment:3> MacRuby <http://macruby.org/>
#1116: Yet another String performance issue ----------------------------------+----------------------------------------- Reporter: yasuimao@… | Owner: lsansonetti@… Type: defect | Status: closed Priority: blocker | Milestone: MacRuby 0.9 Component: MacRuby | Resolution: fixed Keywords: | ----------------------------------+----------------------------------------- Changes (by lsansonetti@…): * status: new => closed * resolution: => fixed * milestone: => MacRuby 0.9 Comment: Thanks for checking :) I'm therefore closing this bug. -- Ticket URL: <http://www.macruby.org/trac/ticket/1116#comment:4> MacRuby <http://macruby.org/>
participants (1)
-
MacRuby