Robert Klemme
3/29/2009 11:05:00 AM
2009/3/27 Damjan Rems <d_rems@yahoo.com>:
>
> This simple code shows everything:
>
> time = [Time.new]
> c = ''
> 'aaaa'.upto('zzzz') {|e| c << e}
> 3.times { c << c }
> time << Time.new
> File.open('out.file','w') { |f| f.write(c) }
> time << Time.new
> c = File.open('out.file','r') { |f| f.read }
> time << Time.new
> 0.upto(time.size - 2) {|i| p "#{i} #{time[i+1]-time[i]}" }
>
> ruby 1.9.1p0 (2009-01-30 revision 21907) [i386-mswin32]
> "0 0.537075"
> "1 0.696244"
> "2 40.188834"
>
> ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
> "0 0.551"
> "1 0.133"
> "2 0.087"
>
> That is about 5x slower write and 500x read operation.
Do you have a virus scanner on that Windows box? If so, how are
measurements when switched off?
Cheers
robert
--
remember.guy do |as, often| as.you_can - without end