jmoenig/Snap

Could you please improve the efficiency of snap a little bit?

Closed this issue · 5 comments

image

As you can see from the image:
snap is 4 times slower than original scratch, 20 times slower than turbowarp, 45 times slower than python!

Please optimize the efficiency a bit, at least don't be slower than original scratch. Please!

Now, your code is becoming the bottleneck of my algorithm.

The comparison is interesting, I suppose, but this isn't an issue that can just be resolved so easily.

If you're concerned about a specific algorithm or project it's helpful to share that info.

But, what I would recommend trying is the gray WARP block. That will significantly speed up operations as long as you don't need to draw something on the stage.

Snap is slow... for loops, broadcasts, and more, but it is faster than scratch in some other ways. For example, it has Higher Order Functions, which provide a much faster way of calculating something in a list (doesn't have to be a list, but it's usually a list). There is also hyperblocks, which allows you to run arithmetic operations on all the elements in a list, suvh as, adding 5 to every item in a list, adding two lists together, etc. Plus, custom blocks allow you to create custom reporters, which do save time. One thing you should know is, code actually runs faster inside custom blocks (without warp) all because snap doesn't have to keep checking to see if the code changed.

The comparison is interesting, I suppose, but this isn't an issue that can just be resolved so easily.

If you're concerned about a specific algorithm or project it's helpful to share that info.

But, what I would recommend trying is the gray WARP block. That will significantly speed up operations as long as you don't need to draw something on the stage.

The warp block doesn't make things faster at all.

The efficiency of the current latest release of snap is still rubbish, not a single improvement have been made.
Why you closed this as completed while in fact you've done nothing?