Performance no acceptable #32
Comments
I made a quick check
In the same loop takes 5.2 seconds. Still slower than NumPy, but clearly showing that Swift is not really useable for vector operations. At least not the "Swift"-way. |
Sounds like we should redefine
I did provide some speed comparisons at http://scottsievert.com/swix/speed.html These can be re-run with |
Also we should verify that the compile time flags are set proper (more detail on the speed page). |
I have coded my test in C++ (honestly with quite some optimization, but that's what I'm really after)
and it took 0.07 seconds. So for me the answer is clear. Swift is no good choice for such things. The language does not offer enough freedom to implement this kind of operations. It's simply a knock out. You can use it for children's math (if you have matrices with a few dozen entries), but for large problems (I'm targeting towards neural networks), there is no way to get Swift to work. Note that I already have tested the above with optimization. Btw. Your speed.swift has not been merged. It would not compile. |
Running this little Python snippet on my machine takes 3.5 seconds:
The corresponding Swix-variant takes 33.7 seconds (factor 10 slower than NumPy).
The text was updated successfully, but these errors were encountered: