Why is Snap so laggy?

It's AT LEAST 10 times slower than like any other programming language.
Why?

It isn't that Snap is laggy, its most likely that you have bad internet connection.

(or what @programmer_user said)

If you care about speed, learn C++. Snap is could laggy since it's interpreted and has to handle rendering of the blocks.

What projects have you made/run in Snap! and in other programming languages that makes you say this?

Can you post links to projects that demonstrate this?

Speed is arguable. I'll find you a hundred, actually scratch that, a thousand languages in which it will take you forever to build stuff that literally takes under 2 seconds to do in Snap!.

Point in case: add 5 to all numbers from 1 to 1000 in C. Here's what that takes in Snap!:

untitled script pic

I made this complex program in the time it took me to drag two blocks and write three numbers.

I guess the answer is that we value your time, not the processor's.

Snap! isn't just a language; it's also a complex runtime graphics system and a lively development environment. ("Lively" means that you can, for example, drag a block into the middle of a script and it immediately becomes part of the running program.) All that takes time.

But also, it's an interpreted language implemented using another interpreted language (JavaScript). So it'll never be as fast as compiled C code executed as machine language. If you want to make the comparison, run your program inside a WARP block.

We do expect to compare our speed with another doubly-interpreted lively language, namely Scratch. Our typical benchmark results show that we're faster at some things and they're faster at others, and which benchmarks are which varies as we and they introduce new versions.

Ok, thanks for telling me.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.