4 ms·
> On the machine this was implemented, insertion speed increased ~110x, compared with the non-hinted implementation. That makes it sound like type hints are es
by vinkelhake 13y ago
> On the machine this was implemented, insertion speed increased ~110x, compared with the non-hinted implementation.
That makes it sound like type hints are essentially mandatory for anything where performance matters.
Nice article! It would have been interesting to see how it fares against something like java.util.HashMap.
- zephjc 13y agoYeah, the less runtime reflection you make it use, the better the speed gains (I'm glad type hints are optional though).
- DigitalJack 13y agoI only start type hinting if performance has proven to be a problem.
- chc 13y agoAs the article suggests, rather than consider type hints mandatory, it's better just to check whether you need them with warn-on-reflection.
- cbp 13y agoIf performance matters _and_ you're doing interop with java.