From: Phillip Gawlowski Date: 2008-05-09T03:16:58+09:00 Subject: Re: Comparing String with Symbol -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Simon Krahnke wrote: | * Michael Neumann (19:17) schrieb: | |> Albert Schlef wrote: |>> Michael Neumann wrote: |>>>> # uses up memory in a hurry :) |>>> This one isn't better, despite being shorter ;-) |>>> |>>> a = []; loop { a << 1 } |>> A slight improvement is to change '1' to '1.0'. A Fixnum doesn't |>> allocate an object structure. |> Yes, but it will run out space regardless :) | | No, that depends on how much space is available. Space is a finite resource. Sooner or later, that code *will* consume all available memory. - -- Phillip Gawlowski Twitter: twitter.com/cynicalryan Blog: http://justarubyist.blogspot.com ~ - You know you've been hacking too long when... ...you find out that you can't get to sleep, because you are, in fact, the program you're designing, and can't run to completion as the lower level routines haven't been coded yet. [This may be one of the disadvantages of top-down design...] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEARECAAYFAkgjQ5EACgkQbtAgaoJTgL9KNACeO8LQ898C8c6mMFknW74JYkTQ baYAoIjNS41z1+DU4Ap6gKRm8hwFjU4f =GLfM -----END PGP SIGNATURE-----