digitalmars.D - Take Python, add ";" and "auto", get 140x speed up ;)
- thedeemon (12/12) Jan 06 2014 Just a bit of evangelism.
- Brian Schott (2/2) Jan 06 2014 But if it's in D how will your type mismatches leap out of the
Just a bit of evangelism. Original post of drawing Ulam's spiral of primes: http://users.softlab.ece.ntua.gr/~ttsiod/primes.html the Python code: https://github.com/ttsiodras/PrimeSpirals/blob/master/primeSpirals.py Direct translation to D: https://gist.github.com/thedeemon/8295146 Result is somewhat shorter and two orders of magnitude faster even with the same very very slow and unoptimal algorithm. And, it seems, 2x faster than PyPy and Shedskin that do pretty much the same thing. http://www.reddit.com/r/programming/comments/1ujoyk/the_ulam_spiral_python_50x_speedup_with_pypy/
Jan 06 2014
But if it's in D how will your type mismatches leap out of the shadows at you at runtime?
Jan 06 2014