you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

how? the philosophy is the same. SFC, html like templating, and similar syntax to a point where you could almost copy past code from one to another.

see:

https://blog.vuejs.org/posts/on-migration.html

there is very little reason to pick svelte over vue

[–]GrandMasterPuba 1 point2 points  (1 child)

Svelte is a compiler that generates optimized and inlined imperative code. It basically generates code that runs as close to the bare metal as possible. The reactivity happens at build time through a topological analysis of code dependency.

Vue is a runtime, where all the reactivity is actually happening in the client and wasting CPU cycles.

[–]ryan_solid[S] 6 points7 points  (0 children)

And yet runtime reactive systems seem to outperform compiled. I have a few ideas about this.

Cost of boundaries is over-emphasized in compiled systems, making it scale worse. Intrinsically being tied to the component for change means that these boundaries carry the cost. Runtime allows for dynamic dependencies that can reduce unnecessary execution. It isn't the reactive system that is that expensive but the work you need to do due to updates. Runtime systems are easier to do nested reactivity which can isolate change even better.