One thing that is incredibly frustrating about certain classes of changes is that I have to implement 90% of it to find out if it's worth it
-
Show this thread
-
I'm incredibly lucky to be in a situation where I can go spend days or weeks exploring an idea that may amount to nothing (<3 Shopify)
1 reply 0 retweets 20 likesShow this thread -
I *think* I will have a significant perf bump for AR users this time though. I'll know for sure tomorrow (it involves
@rustlang)3 replies 3 retweets 21 likesShow this thread -
Now I'm curious.
2 replies 0 retweets 0 likes -
Replying to @metaskills @rustlang
I'll probably push most of the code up tomorrow. It's really not terribly interesting. Just a bunch of internal objects re-implemented in Rust, but specifically avoiding telling Ruby that the smallest objects exist unless we absolutely have to
1 reply 0 retweets 1 like -
One thing that I find very interesting though is that this means that `attributes[:foo].value` has a signficiant performance difference from `attributes.fetch_value(:foo)` even though the definition is just https://github.com/rails/rails/blob/daf77db65d9d5e295ee3ba86605988875cb834e4/activerecord/lib/active_record/attribute_set.rb#L46-L48 … in Ruby
1 reply 0 retweets 0 likes -
The reason for the difference is that `#[]` has to return a Ruby object, which Ruby will try to garbage collect -- even though I gave it a null free function, and the memory involved will outlive when Ruby thinks it does. Just adds needless GC pressure
1 reply 0 retweets 0 likes -
Cant wait to learn a bit more about that. Never heard of a null free function before.
1 reply 0 retweets 0 likes
It just means "don't call a function"
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.