Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Ruby
What is the difference between :foo and "foo" ?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
Reply to thread
Message
[QUOTE="ara.t.howard, post: 4498773"] <snip test> that way well be true now. however, if you look at my test it goes to some lengths to make the test a little more 'real-world': - creats a large (2 ** 13) hash - poplate using a semi-random distribution - selects keys for lookup in a semi-random distribution - fork for each test to isolate tests somewhat - disable GC for each test - runs each test 4 times in anycase, all i'm driving at is that a pretty heavy duty test (not saying mine is that test) is required to eliminate the differences data distribution, gc, and system load have on the results. in particular i can see how a linear distribution might have a huge effect - seeing as symbols are essentially numbers and hash more predictably whereas making the jump from '9999' to '10000' is likely to land in quite a different bucket. it's nonetheless very interesting to see some tests though. i use both btw. ;-) -a -- =============================================================================== | ara [dot] t [dot] howard [at] noaa [dot] gov | all happiness comes from the desire for others to be happy. all misery | comes from the desire for oneself to be happy. | -- bodhicaryavatara =============================================================================== [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Ruby
What is the difference between :foo and "foo" ?
Top