repo.or.cz
/
ruby-svn.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
history
|
raw
|
HEAD
* transcode.c (trans_open_i): check the result of rb_transcoding_open.
[ruby-svn.git]
/
benchmark
/
bm_io_file_read.rb
blob
2b4212db7638a1244b5b33f8590c82a25a1479bb
1
#
2
# Seek and Read file.
3
#
4
5
require 'tempfile'
6
7
max = 20_000
8
str = "Hello world! " * 1000
9
f = Tempfile.new('yarv-benchmark')
10
f.write str
11
12
max.times{
13
f.seek 0
14
f.read
15
}