Open benibela opened 8 years ago
If you look at the picture, you see indexOf is called over a million times, yet freenodes calls it only 90 000 times.
The other 900 000 calls are in optimzeNodes. Seems the list there is much smaller, as those calls are much faster, being negligible for the time (133 million lr). Still optimizeNodes is among the most costly functions. For some reason it calls TList.create 200 000 times
Also, TList...
There is no reason to use TList with fpc. It is just a wrapper around TFPList. TFPList is preferable, unless you need event handling
When I run my unit tests (till valgrind aborts), 2/3 of the time is spend in parsing regexps, because it calls tlist.indexOf, which is slow. Can you use a hashmap?