Haskell on Android
keera.co.uk
keera.co.uk
Is this efficient? Will end users notice any performance hit from all of these layers?
=========JAVA==========
==C (SDL)== ==Haskell==
Rather than: ===JAVA====
==Haskell==
==C (SDL)==
If that's the case, I wouldn't expect much of a performance hit from the layering given that (as I understand things) ===Java==
==C/C++==
is common for people writing games.You'll certainly have a memory hit of the Haskell runtime (though I'm not sure how that compares to the size of other relevant things), and the performance differential between Haskell and whatever you would have been writing that code in otherwise (presumably C or Java) - which could be in either direction depending on the details.
http://developer.xamarin.com/guides/android/under_the_hood/a...
Still, it performs better than you'd expect.
I like Haskell, but it's not what I reach for when I feel the compulsion to hoard memory carefully, and I'm very interested in precisely controlling memory on mobile devices.
Additionally, having dealt with memory issues on Android (particularly on 2.3 & below), Dalvik doesn't set the bar very high for an alternative runtime to be competitive in memory management.
But, wouldn't it be more accurate to say that "Java was calling native binaries compiled from Haskell source just as if they were compiled from C"? Because Java is linking to a binary library (a .so file) that's already been compiled from Haskell, right? Or am I misunderstanding how this works?
Reminds me of "Black Triangles": http://rampantgames.com/blog/?p=7745