Compiling a new method also clears the cache but that doesn't really matter since I expect there's a limited number of classes that this is happening to and it's not a "runtime" thing. Its when you go clearing your cache at runtime that you get perl's OO to start losing that 30-40% performance vs functions that we used to hear so much about. I've understood that it's all the having to do ISA method lookups that made perl OO slow and applying this stuff to objects during rumtime is buying that problem back again.
But then elegant solutions are also very nice for a programmer and that might be more expensive yet than the CPU time.
⠤⠤ ⠙⠊⠕⠞⠁⠇⠑⠧⠊
In reply to Re^3: Maintaining State with Runtime Traits
by diotalevi
in thread Maintaining State with Runtime Traits
by Ovid
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |