Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
PERF: stop allocating the string "id" over and over #17658
Yep, there are some hot literals like this. We've experimented with their extraction in a couple of branches but need to find a balance between code readability and performance impact. /cc @jeremy
Let's merge this one, but let me make clear for other contributors that we are not suddenly going to merge patches like this unless they are as justified as this one. Doing this at a greater scale is the thing we are exploring precisely.
added a commit
this pull request
Nov 18, 2014
yes, in Ruby 2.1 and above, but in 2.0 and below you will still get dupes.
On Wed, Nov 19, 2014 at 10:02 AM, Jon Atack email@example.com
Code optimizations for ruby 2.0 seems completely unnecessary to me — I imagine the vast majority of folks using 2.x will typically be upgrading to the newest 2.x. Folks stuck on 2.0 for some horrible enterprisey policy reasons are probably a very small set of users and their departments are clearly not optimizing their policies for performance to begin with.
Because we still are not sure if calling freeze inline is the best solution