Replies: 6 comments 12 replies
This comment was marked as off-topic.
This comment was marked as off-topic.
-
|
I haven't seen any info in these threads about how to reproduce it. I don't see why a basic example would take a full second. It doesn't help that this all is happening on Twitter where I can't view the threads without logging in either... https://jakebailey.dev/esbuild-playground/ for example does not work that slowly for esbuild. |
Beta Was this translation helpful? Give feedback.
-
|
For context relevant issues in Go:
Copying what I've said in a response in the go slack:
As someone who touches the Go compiler, I don't think any of this is a language issue (see tinygo), it's an implementation issue due to the go compiler having been designed to target traditional assembly, *by that I mean, unlike what I often hear, the full language is supported, making a compiler is lot of work and gopherjs is still working on generics support for example. |
Beta Was this translation helpful? Give feedback.
-
|
I brought this up previously here. Copying over here for completeness.
|
Beta Was this translation helpful? Give feedback.
This comment was marked as disruptive content.
This comment was marked as disruptive content.
-
|
I was wondering at how this is looking today, and ran into https://tsgo.sxzz.dev/ which is really nice, but worryingly slow, I see ~650ms per compile on a beefy machine. However that's using the published typescript-go wasm build (a very reasonable decision given what's exposed I think), which is essentially the CLI and so it has to redo all of the work for each compile. I hacked together a little fork of both that playground and the typescript-go repo to see what browser-based tooling like playgrounds will be able to do once the APIs are exposed to wasm, and the numbers seem quite nice, ~10-15ms most of the time, occasional dips up to 90ms (probably hitting the garbage collector). It's doing a few of the usual TS Compiler API tricks like avoiding making fresh Program objects, skipping type checking, and using isolated modules. Check it out: https://ts-go-playground.rictic.com/ |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
There are some concerns about Go performing poorly with WASM (e.g. here).
What are your thoughts on this?
Beta Was this translation helpful? Give feedback.
All reactions