Ask HN: Strategies for portable computation for non-trivial algorithms
What's the "best" method to implement cross platform complex algorithms in a way that allows you to run them as close to the metal on the target language as possible?
To make the question simpler, let's expect that the input data can be expected to fit device memory (under 1 GB), the target device domain encompasses modern consumer class compute substrates - desktops, handhelds, and servers. CPU preferred but option to generate GPU shader is not a bad thing to have.
The algorithm is non-trivial in intrinsic complexity and length (hence you want to implement it only once).
What approach would cover biggest subset of the target languages
Browser-runnable*, .Net, Java, C, Cuda/Metal/Vulkan.
The trivial answer in most cases is plain old C, but there are some cases where the deployment would be easiest to do in the target language and not over FFI.
Haxe seems to be quite close to a "universal definition language". Are there better or others out there?
I recognize the problem is somewhat open ended and ill conditioned, but would enjoy discussion around the topic.
0 comments
[ 4.4 ms ] story [ 7.4 ms ] threadNo comments yet.