⚲
Project
General
Profile
Sign in
Register
Home
Projects
Help
Search
:
Ruby master
All Projects
Ruby
»
Ruby master
Overview
Activity
Roadmap
Issues
Repository
Like
Download (315 Bytes)
Feature #12275
» benchmark2.rb
tad (Tadashi Saito)
, 12/09/2017 05:46 PM
require
'benchmark'
N
=
1000_000
s
=
'あいうえお'
.
dump
t
=
'あいうえお'
.
encode
(
'UTF-16LE'
).
dump
Benchmark
.
bm
(
25
)
do
|
bm
|
bm
.
report
(
'eval'
)
do
N
.
times
{
eval
(
s
)}
end
bm
.
report
(
'undump'
)
do
N
.
times
{
s
.
undump
}
end
bm
.
report
(
'undump with force_encoding'
)
do
N
.
times
{
t
.
undump
}
end
end
« Previous
1
2
3
4
5
Next »
(3-3/5)
Loading...