5 ms·
Would Go provide a viable alternative to C++ for numeric and computer graphics 'kind of stuff'? I have no problem with C++ but the better-than-python proclamati
by fsloth 11y ago
Would Go provide a viable alternative to C++ for numeric and computer graphics 'kind of stuff'? I have no problem with C++ but the better-than-python proclamations got me intrigued.
- vvanders 11y agoGiven that there's a GC and from what I understand(I'm no go expert) limited ways to specify memory layout I'd say no.
- fmstephe 11y agoI am curious about the limitations around memory layout. Go provides a fair amount of control to the programmer. Fields appear in the order declared in a struct (although potentially padded), structs declared as values, not pointers, are located in memory with the declaring struct and we can have arrays and slices of non-pointer structs they will all be arranged contiguously in memory. I am not a C/C++ programmer are there more powerful facilities provided in these languages? Real question, not trying to start a flame war :)
- FraaJad 11y agoD is a viable alternative for C++; you still get to enjoy near native performance and cleaner FFI compared to Go, without giving up the features of a modern programming language.
- kid0m4n 11y agoYes. Its always good to read the D success stories.
- andreaferretti 11y agoAlso, Nim would be a good fit for those domains. Macros and custom operators allow one to write dsl for numeric and scientific programming, and you have complete control over memory layout. There is a gc, but you can tune it very precisely
- e12e 11y agoI would guess Julia (or D) today, perhaps Rust in the not so distant future. I'm not sure if Go will ever be a good fit if you need really high and/or deterministic performance?
- Nrpf 11y agoStick to python- Numba is a python compiler that compiles numerical code to Cuda and LLVM that is faster than Julia (single threaded and multi threaded).