On Thu, 01 Dec 2011 19:54:48 +0100 "Marco Leise" <marco.le...@gmx.de> wrote:
> Ok, so this is how you can optimize the program. Actually these suggestions weren't about optimization. Bearophile is big on consistency and style. For example you don't use the built in sort because it should not exist, and std.algorithm.sort returns a SortedRange which will then be usable by other functions (std.algorithm.find) to use a faster algorithm (bubble search). So basically, do it the D way, then it will be easier to look at improving performance. One statement I liked from, I believe, Andrei was "the easy way should be the right way, and the [wrong way] should be possible" not an exact quote and "wrong way" was actually something else.