⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (228 Bytes)
Bug #4298
» benchmark.rb
Benchmark showing described problem -
radarek (Radosław Bułat)
, 01/20/2011 06:21 PM
# encoding: utf-8
require
'benchmark'
s1
=
"ąćęłńóśżź!0123456789"
puts
Benchmark
.
measure
{
1000
.
times
{
s1
[
1
]
}
}
s2
=
"ąćęłńóśżź!0123456789"
*
100_000
puts
Benchmark
.
measure
{
1000
.
times
{
s2
[
1
]
}
}
(1-1/1)
Loading...