4 ms·
"""This is almost a direct translation of what I'd write in python""" Except that the C++ version can be highly concurrent and 100 times faster :-) I'm exagge
by st3fan 19y ago
"""This is almost a direct translation of what I'd write in python"""
Except that the C++ version can be highly concurrent and 100 times faster :-)
I'm exaggerating a bit here of course, but in many cases C++ can certainly be a better choice. Even though it is MUCH more verbose.
S.
- tptacek 19y agoYou are going to have a hard time making a case for a situation where C++ is better than C + Python.
- palish 19y agoIt would be difficult to implement Megatexture in Python without writing most of it in C/C++ and a shader language like GLSL/HLSL. Also, having a Python interface to Megatexture wouldn't buy you any flexibility because Megatexture's job is well-defined. It's mostly an optimization problem. http://en.wikipedia.org/wiki/MegaTexture http://en.wikipedia.org/wiki/MegaTexture
- yummyfajitas 19y agoOne situation I ran into recently: computational geometry. It's not usually just an inner loop that needs to be carefully optimized, often there various levels of calculation that need to be done. I'd actually much prefer to use Ocaml for that use case, but libraries made the choice of C++ for me. (C++ is also good to have on the resume.)