Re: "" vs ''

From: James Edward G. II [mailto:[email protected]]

  • It’s less work for the interpreter.
    What makes you say this?

>> Rehearsal ---------------------------------------------

>> double: 0.270000 0.000000 0.270000 ( 0.267826)

>> single: 0.260000 0.000000 0.260000 ( 0.266784)

>> ------------------------------------ total: 0.530000sec

>>

>> user system total real

>> double: 0.270000 0.000000 0.270000 ( 0.268957)

>> single: 0.290000 0.000000 0.290000 ( 0.286691)

And, FWIW, I did the same thing using a really long string with lots of
\ and # characters in it. I came to the same conclusion: no perceptible
difference in speed.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs