GHCJS performance - Haskell

Welcome to the Functional Programming Zulip Chat Archive. You can join the chat here.

TheMatten

@Sridhar Ratnakumar or someone using GHCJS - what's your experience when it comes to performance? Do normal GHC optimizations apply? Is there some visible difference compared to e.g. idiomatic JS?

Sridhar Ratnakumar

Probably a best question for #reflex-frp on freenode; however I can tell you that complex apps (like Slack) can be tricky to implement with GHCJS with smoother performance. https://www.wrinkl.com/ is a Slack-like app written in reflex/ghcjs - and you can see how it lags in practice. Most apps however do reasonably well, if you stick to FRP principles.

Get started, it’s free! Get all the pros of group messaging, without all the cons. Get started, it’s free!
TheMatten

So this lagging is caused by overhead of GHCJS in idiomatic code, not by difficulty of making idiomatic Reflex code performant, right?

Georgi Lyubenov // googleson78

ghcjs emulates ghcs runtime, so the result is surely not "idiomatic js"

TheMatten

Yeah, that's what I'm thinking about - normal GHC runtime is wildly different from what usual strict languages do

Sridhar Ratnakumar

.. with some patches in reflex-platform, for example text package is patched to use js string