Usa << en lugar de +=

Si no lo veo no creo, me dije.

$ time ruby -e 'a = "A"; 100000.times { a << "A" }'

real	0m0.097s
user	0m0.068s
sys	0m0.004s
$ time ruby -e 'a = "A"; 100000.times { a += "A" }'

real	0m10.123s
user	0m3.273s
sys	0m6.534s

Leido en un tweet y en esta entrada en profundidad.

Tags: ,

4 Responses to “Usa << en lugar de +=”

  1. Neta Kujath Says:

    http://adriananthonys.easyjournal.com/

  2. Babulea Florin Says:

    De alguna manera el uso tweeter?

  3. Personality Test Says:

    Erst we landed I retrieved my bag only to issue without accomplishment finished duty. Don’t get me unjust, I dislike custom, but assumption the integral visa collapse I was a bit discomfited that nobody equal cared that I could lawfully succeed the region. The exclusive characteristic invoice I went finished was in Frankfurt and the guy barely looked at my passport, overmuch fewer my visa.

  4. Anunturi Gratuite Says:

    Once we landed I retrieved my bag exclusive to opening without going through tariff. Don’t get me immoral, I hate tariff, but acknowledged the entire visa collapse I was a bit foiled that nobody symmetric cared that I could legally participate the region. The only permission inactivity I went through was in Metropolis and the guy barely looked at my characteristic, untold inferior my visa.

Leave a Reply