summing large arrays - or - performance of tight loops

Thomas Kuehne thomas-dloop at kuehne.cn
Mon Apr 23 10:51:58 PDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Dan schrieb am 2007-04-18:
>
> Indeed, this is clearly an optimization problem.  I agree that we should
> put our faith in the compiler because it's bad to undermine it to try to
> write optimal code when the compiler may still be improved to solve the
> problem *properly*
>
> That said, DMDScript undermines associative arrays by completely
> re-implementing them with a tweak - instead of using opIndex and
> opIndexAssign.  : p
>
> But yes, let's work on getting the compiler to Do The Right Thing(tm) so
> we don't have to kludge our code, mm?

Originally I needed to find the fastest way to iterate repeatedly over
large arrays and apply trivial operations to each element. I've put the
results only so that others can have a look to, not to prioritise compiler
tweaks over bug fixing.

Thomas


-----BEGIN PGP SIGNATURE-----

iD8DBQFGKhTGLK5blCcjpWoRAg2XAJ4w03fB+vup/GKPkV/MBtLKb7oVowCeNz8Z
opdrrDv1fXLJLQrx9TEZYKg=
=Zr9Q
-----END PGP SIGNATURE-----



More information about the Digitalmars-d mailing list