a = a[1..]; a += ({ some_value });
This is quite slow, especially for big arrays :)
And mappings would help here, or what is your point? That inappropriate use of a datatype is slower than using the right one (ADT.Queue)?
As Martin said already - then Python regexps are slow too. And everyone knows alternative which is faster and powerful, but it is still not in Pike :)
But that is wrong. Running regexp tests written purely in C using the PCRE library is 13% slower than the same tests run in Perl. Pike is then 3% slower than C and Python is then 62% slower than Pike. Then follows Java, which is 22% slower than Python. To call Pike regexps slow is simply not true. And to think that the performance is going to improve without doing something drastic, like writing a new regexp engine from scratch, is to be unrealistic IMHO.
/ Martin Nilsson (Åskblod)
Previous text:
2003-01-29 01:31: Subject: Re: reasons why pike is better than python?
On Wed, Jan 29, 2003 at 12:55:03AM +0100, Martin Nilsson (Åskblod) @ Pike (-) developers forum wrote:
No, appending elements to arrays are fast in 7.4.
It depends. If it is combined with elemnts removal, epsecially like:
a = a[1..]; a += ({ some_value });
This is quite slow, especially for big arrays :)
No, Pike regexps are faster than e.g. python regexps according to the langauge shootout.
As Martin said already - then Python regexps are slow too. And everyone knows alternative which is faster and powerful, but it is still not in Pike :)
PS: 2 Martin: could you please change the subject to something like: "Reasons why apples are better than oranges?" :)) I think that every language has its advantages and disavantages, which are dependent on task, so... :))
Regards, /Al
/ Brevbäraren