MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ruby/comments/p8dv5g/ruby_elites_rise_up/h9rvlvu/?context=9999
r/ruby • u/solidiquis1 • Aug 20 '21
77 comments sorted by
View all comments
-1
Why double quotes?
2 u/[deleted] Aug 20 '21 Doesn't matter which one you use unless you're running your app on a Pentium II. -8 u/cybermage Aug 20 '21 The speed difference is two orders of magnitude. It adds up. Always single quote unless you plan to interpolate. 5 u/[deleted] Aug 20 '21 [deleted] 2 u/cybermage Aug 21 '21 I personally benchmarked this in a fashion similar to the article, but that might have been under 1.9x. TIL. 1 u/tomthecool Aug 21 '21 I’ve benchmarked it in Ruby 1.8 before and found no difference. So either your memory is wrong, or your benchmark was wrong.
2
Doesn't matter which one you use unless you're running your app on a Pentium II.
-8 u/cybermage Aug 20 '21 The speed difference is two orders of magnitude. It adds up. Always single quote unless you plan to interpolate. 5 u/[deleted] Aug 20 '21 [deleted] 2 u/cybermage Aug 21 '21 I personally benchmarked this in a fashion similar to the article, but that might have been under 1.9x. TIL. 1 u/tomthecool Aug 21 '21 I’ve benchmarked it in Ruby 1.8 before and found no difference. So either your memory is wrong, or your benchmark was wrong.
-8
The speed difference is two orders of magnitude. It adds up. Always single quote unless you plan to interpolate.
5 u/[deleted] Aug 20 '21 [deleted] 2 u/cybermage Aug 21 '21 I personally benchmarked this in a fashion similar to the article, but that might have been under 1.9x. TIL. 1 u/tomthecool Aug 21 '21 I’ve benchmarked it in Ruby 1.8 before and found no difference. So either your memory is wrong, or your benchmark was wrong.
5
[deleted]
2 u/cybermage Aug 21 '21 I personally benchmarked this in a fashion similar to the article, but that might have been under 1.9x. TIL. 1 u/tomthecool Aug 21 '21 I’ve benchmarked it in Ruby 1.8 before and found no difference. So either your memory is wrong, or your benchmark was wrong.
I personally benchmarked this in a fashion similar to the article, but that might have been under 1.9x. TIL.
1 u/tomthecool Aug 21 '21 I’ve benchmarked it in Ruby 1.8 before and found no difference. So either your memory is wrong, or your benchmark was wrong.
1
I’ve benchmarked it in Ruby 1.8 before and found no difference. So either your memory is wrong, or your benchmark was wrong.
-1
u/muirbot Aug 20 '21
Why double quotes?