logoalt Hacker News

mpweiheryesterday at 2:44 PM4 repliesview on HN

Except JavaScript isn't "crazy fast".

Not by a long shot.

How did Microsoft just make Typescript 10x faster? Oh right, by reimplementing it in Go.

https://devblogs.microsoft.com/typescript/typescript-native-...

See also:

https://blog.metaobject.com/2015/10/jitterdammerung.html

Please don't use Electron.


Replies

domgayesterday at 9:40 PM

The problem with Electron is not that people choose it over native tech like WPF or SwiftUI, they choose it over nothing. Without Electron tons of cross platform apps simply wouldn’t exist.

I think macOS suffers the most since it is not that hard to port an iOS app to Mac, and Linux benefits the most.

Bolwinyesterday at 10:22 PM

The author said the mean reason for the speedup was parallelization, not Go being particularly faster. The JS JIT is very good. In most benchmarks I've seen its not much slower than Go.

nielsbotyesterday at 3:17 PM

I am going to miss being able to host TypeScript in a web view however.

show 1 reply
ajrossyesterday at 3:17 PM

Meh. Flaming about this is so exhausting given that the war was already fought and we know who the winner is.

First, that's the typescript compiler, not typescript apps. And it was a ground-up rewrite effort (a very large one) with a specific eye toward improving the performance of the original, which was widely held to be sub-optimal for reasons entirely unrelated to implementation language. Suffice it to say that, hell no, you can't just transpile your code to Go and expect it to run faster. We all know it doesn't work like that.

But more broadly, landing with "Please don't use Electron" in the context of a comment about a MS product seems weird given the implementation framework of Microsoft's single most impactful new UI project of the last decade...

Just stop, basically. You lost. Use Electron. It works great and everyone else already does and proved you wrong.

show 3 replies