Slower than Python
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sat Mar 2 07:33:37 PST 2013
On 3/1/13 8:05 PM, cvk012c wrote:
> In my latest version of D script I didn't use splitter at all. I used
> string specific indexOf function. Still result is very bad. For text
> based protocols, such as SIP, performance of string manipulating
> functions is very important. Unfortunately, looks like it is not D
> strongest point at this time.
That conclusion would be hasty if not missing the whole point. You
essentially measured the speed of one loop in various translators
implementing various languages. Java code doing straight computation is
on a par with C speed, no two ways about that. Python code using library
primitives ain't no slouch either. Performance tuning in these languages
becomes more difficult in larger applications where data layout,
allocation, and indirect function calls start to dominate.
The claim of systems languages being fast materializes only when you
need to optimize data layout and nonstandard, custom algorithms. At that
point systems languages give you additional options, whereas with
high-level languages optimization becomes a very difficult proposition.
Andrei
More information about the Digitalmars-d
mailing list