No, appending elements to arrays are fast in 7.4. No, Pike regexps are faster than e.g. python regexps according to the langauge shootout.
Generally speaking, try to push iterations from Pike code down to the lower levels. Eg. in C code you often have for loops and other iterators while in Pike you should try to use the map, filter, sum etc. functions. But iterations has become much faster in 7.4 than before.
If you are concatenating large amounts of strings it may be faster to use String.Buffer to avoid the shared string performance penanlty. The overhead of using an object however makes it slower for less than 11 concatenations according to my measurements. I am working on a plan to have this kind of optimizations done automatically.
/ Martin Nilsson (Åskblod)
Previous text:
2003-01-29 00:42: Subject: Re: reasons why pike is better than python?
On Tue, Jan 28, 2003 at 08:25:03PM +0100, Martin Nilsson (Åskblod) @ Pike (-) developers forum wrote:
There are of course dos and donts in Pike as well, but we try to adress them in the optimizer when we find them.
details? what about appending elements to an array vs a mapping? the latter is supposed to be faster (some people claim anyways)
regexps are very slow, better use sscanf()
any other?
greetings, martin.
/ Brevbäraren