Лупайте сю скалу...

Іван Франко


 RSS | Atom

19 June 2015

TOP »

Selected projects See all »

Banalize: Bash static code analyzerDBIx::Report::ExcelShell settings, AKA dotfilesNagios Monitoring for Couchbase serverNagira: RESTful API for NagiosStartpack for Github pages developmentWeb iPhoto

Travel Blog Витрішки »

Україномовний блог Витрішки - блог про все, крім роботи. Цикл статей "Літо на півночі Японії" з цього блогу тепер опублікований у Витрішках

Computer Blog All posts »

iPhoto and files permission Is MacOSX 10.9 == MacOS 9.x? Running Chef roles from Capistrano und Capiche Github & Jekyll: Speeding up Jekyll siteGithub & Jekyll: More experience with Jekyll and setup changesBuild new hosts with Capistrano and Chef Request Tracker: More about custom CSS for RT4Ruby 2 test drive Nagira v0.2.5 release It's UNIX my dear Watson

Slides See all »

Nagira @TLUG, 2012Rspec and Guard

About

Ярило Yarylo, Jarilo me @ github me @ CPAN Dmytro (CV)

Ruby 2 test drive

Ruby 2 is fast! . First experience of running some of my scripts in Ruby 2 was: WOW !!! .

Ruby 2.0.0-p0 is barely out. I was wating for it to appear on RVM radar and today tried it finally. And ... as I said WOW !!!

Look at the numbers below. It's not what you can call a scientific approach for benchmarking, but demonstrates main idea well enough.

Running same small script in 2 Ruby revisions. Ususally second run is faster since some libraries are already preloaded in memory.

Can you see the difference?

ruby-1.9.3-p374

  Run          First       Second
               ------      -----
  real         2.12        1.68
  user         1.54        1.53
  sys          0.16        0.13

ruby-2.0.0-p0

  Run          First       Second
               ------      -----
  real         0.89        0.66
  user         0.59        0.56
  sys          0.10        0.09





дмитро ковальов
dmytro @ github
dmytro.sytes.net