4 ms·
Yup. Also, recursion can be very bad for parallel stuff, if not done carefully. We used to have to do a lot of optimization, in my old job, involving use of G
by ChrisMarshallNY 5y ago
Yup.
Also, recursion can be very bad for parallel stuff, if not done carefully.
We used to have to do a lot of optimization, in my old job, involving use of GPUs, ISPs, multi-thread, etc.
In that kind of environment, things can get quite crazy, and seemingly innocuous stuff, can have huge knock-on effects.
For example, cache hits. If you want your code to stay in a shallow cache (which could result in 100X improvement in speed), you may do things like write something over and over, inline, instead of calling a method or subroutine.
- eatonphil 5y agoParsing in the context of databases and compilers is almost assuredly not the bottleneck.