Created
October 6, 2014 07:01
-
-
Save spangenberg/ee331c5cb46db9111b3c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require "benchmark" | |
| b = Benchmark.realtime do | |
| 10_000_000.times.each { "HalloDasIst=EinKeyVonMir".split("=")[1] } | |
| end | |
| puts b | |
| b = Benchmark.realtime do | |
| 10_000_000.times.each { "HalloDasIst=EinKeyVonMir"[12..-1] } | |
| end | |
| puts b |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 4.929568 | |
| 2.382281 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment