3 ms·
No, you don't. You "just" need slower fallbacks that does metadata lookup for things that are not statically decidable. Consider how many people end up impleme
by vidarh 12y ago
No, you don't. You "just" need slower fallbacks that does metadata lookup for things that are not statically decidable.
Consider how many people end up implement their own introspectable C object models.
- chrisseaton 12y agoI think the very real risk here is that you think you're adding those slower fallback features just for edge cases, but in reality they get used in the majority of cases. I believe that some code paths critical for performance in Rails use metaprogramming, for example. I did an experiment in this paper http://dl.acm.org/citation.cfm?id=2647517&dl=ACM&coll=DL&CFID=457148130&CFTOKEN=84773324 http://dl.acm.org/citation.cfm?id=2647517&dl=ACM&coll=DL&CFI... where I showed that just be rearranging some code you can confuse the Rubinius object allocator into using a slow path for instance variables. That gives you both slow performance, and worse than that, unpredictable performance - the programmer doesn't understand what they've done wrong to trigger that fallback performance.