4 ms·
Go tends to be at least as fast as Java with a much smaller memory footprint. It ought to run well on any device that can run Java, which includes a lot of smal
by SiVal 8y ago
Go tends to be at least as fast as Java with a much smaller memory footprint. It ought to run well on any device that can run Java, which includes a lot of small devices.
- abstractbeliefs 8y agoIf I remember right though, the smallest devices running Java (comparable to the AVR devices in specs) were mostly designed at the hardware level to run Java, so there were lots of considerations made that wont be true for an AVR microcontroller that has a first-class C toolchain. Additionally, the Java Card specification was a pretty cut down version of Java that didn't have the same "Not _yet_ supported" feature list here.
- stmw 8y agoI actually wouldn't expect Go to be considerably better in memory footprint (or other things) than "embedded" Java in embedded environments. Once you accept the idea of having GC, it puts some constraints on things. Of course, you can't compare "server java" with embedded java -- those are as different as TinyGo and "real" Go, if not more so...
- lossolo 8y agoNormal Go is a lot more memory efficient than normal Java, it has value types and no VM/JIT overhead. In my own measurements it was up to 50x times more memory efficient.
- crawshaw 8y agoAlso: UTF-8 instead of UTF-16 can make a surprising difference on memory use, especially if you interact with services in UTF-8 and so spend a lot of memory in Java copying back and forth.