3 ms·
wow. i ran their prime number python accelerator example on 10 000 000 upper bound: (taichi) [X@X taichi]$ python primes.py [Taichi] version 1.4.1, llvm 15.0
by inconceivable 4y ago
wow. i ran their prime number python accelerator example on 10 000 000 upper bound:
(taichi) [X@X taichi]$ python primes.py
[Taichi] version 1.4.1, llvm 15.0.4, commit e67c674e, linux, python 3.9.14
[Taichi] Starting on arch=x64
Number of primes: 664579
time elapsed: 93.54279175889678/s
Number of primes: 664579
time elapsed: 0.5988388371188194/s
- ipnon 4y agoIt seems like Taichi fast language, but it can also never be overstated how slow Python is on contemporary architectures.
- nerdponx 4y agoRight, I'd like to see a comparison to Nim or Julia, or another compiled high-level language that isn't particularly performance-oriented like Haskell or Clojure, or Common Lisp, or even Ruby with its new JIT(s). Or for that matter, Python with Numba or one of the other JIT implementations (PyPy, Pyston, Cinder).
- ActorNightly 4y agoIt doesn't support 3.11 yet. 3.10 is slow compared to 3.11.
- nxpnsv 4y agoyeah, but not on the level as the top level comment...
- gus_massa 4y agoIs that improvement caused because the program is automatically parallelized or because the code is compiled/JITed? A x150 improvement is too much, so I suspect both reasons collaborate to get it.
- inconceivable 4y agothey say the example i used is JIT compiled into machine code. i haven't looked into the codebase yet but i presume that means it just un-pythons it back into C? not sure. fwiw, i tried the gpu target (cuda) and it was faster than vanilla, but slower than accelerated cpu target by about 4x.
- gus_massa 4y agoHow does it compare with numba? (I don't know enough about the python ecosystem, but I have to tweak code from one of my coworkers and he uses numba.)
- adgjlsfhk1 4y agoAnd if you run it on a number bigger than 2^64, does it error because taichi automatically assumes python's BigInts are Int64s?