Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Please let Dart compile to native executables on desktop OS'es


It already does, and they're working on making it easier.

https://github.com/dart-lang/sdk/issues/34343

Not sure if this will use AOT or JIT though.


> Not sure if this will use AOT or JIT though.

You can do either. You can compile a snapshot and run that on the JIT VM. This basically gives you faster startup because it doesn't have to do all the source parsing, resolution, type-checking, etc. but gives you the general runtime performance of a JIT VM (think V8 or the JVM).

Or you can AoT compile your app all the way to native code. It's similar to how a shipped Go or OCaml works where it compiles your code and the language's runtime together into a single executable.


I was more referring what Flutter would do out of the box for desktop, but yeah, the question didn't mention Flutter.

By the way, is there a good performance breakdown between Dart's AOT vs JIT? I've read some tweets/comments that JIT is still generally faster. Not including warm-up of course.


I don't know of any good canonical references. The perf story is always changing since a lot of this back-end work is pretty new. Also, the type system changes in 2.0 are still fairly new and I'm not sure how much the back-ends take advantage of those types yet.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: