Hi Guys, Is Kotlin JS Stable at the moment? I las...
# javascript
b
Hi Guys, Is Kotlin JS Stable at the moment? I last checked a few months ago and i recently saw a new update. Im not a developer, but I need to make a recommendation to my management if Kotlin JS is a wise thing to go for. FYI we build low latency stock trading system so high performance and stability is important for us.
v
b
Currently we are using Multiplatform for iOS and Android. So if we start using that same code base for Kotlin JS, the performance should be stable?
e
the definition of "stable" here does not imply anything about performance or correctness
"stable" is with regards to the API; you should not expect to need to rewrite your code in future releases
b
Kjs is just a transpiler for js, so performance is similar. The only downside is that bundles are larger and take longer to download and load, but after that there should be no runtime difference from vanilla js
e
my experience is that K/JS output is significantly slower than equivalent code in pure JS due to choices in representation and various runtime checks
b
Ah, fair enough. Looks like I was spreading misinformation again - apologies...
e
similar story with Kotlin/Native - currently slower than equivalent code written in native languages (I've only done direct comparisons with Rust but others like C and Swift should be in the same ballpark)
this doesn't mean it's not stable (well, it's "beta" which is mostly stable in Kotlin terms)
just to make sure this doesn't sound too negative: K/JS and K/N performance has been improving with each release
r
All of the above. Plus in general performance isn't in general a blanket yes or no. You need to benchmark your particular usage patterns and performance critical code to see if it performs well enough for your use case.
☝️ 1