Marshal.load Speed
drbrain |
File.open 'dump' do |fp| Marshal.load fp end
Is much slower than:
File.open 'dump' do |fp| Marshal.load fp.read end
Because the former uses IO#getc and the latter operates directly on a String.
I learned this tonight while helping profile code at a Seattle.rb hacking night.
commentsComments are disabled


