3 ms·
To see if an algorithm is viable for example. Obviously if you write code for a prototype that has several limitations (say it's single-threaded) in order to d
by berkut 10y ago
To see if an algorithm is viable for example.
Obviously if you write code for a prototype that has several limitations (say it's single-threaded) in order to determine if a new algorithm provides the correct result, you probably don't want to be concerned at this stage with complete safety if you can run it for the prototype in single threaded mode and probably not have any issues.
That might allow you to make a decision as to whether to continue down that path quicker than having to write a more robust solution and then realise it doesn't actually work with certain input data or something.
- catnaroek 10y ago> To see if an algorithm is viable for example. C++ isn't exactly the first language I would pick to test the viability of an algorithm. Too much ceremony, distracting me from the essence of the algorithm. ML seems more up to the task.
- coldtea 10y agoThat's viable only if you're writing the algorithm for academic fun. If you want to check its specific runtime behavior and speed with C++, for incorporation into a program, then you can't just use ML or Python etc.
- catnaroek 10y agoMLton comes within a factor of 1.5 or 2 of C and C++'s runtime speed, at the price of requiring whole-program compilation and having long compilation times. (Not that C++'s compilation times are blazing fast either.) The implementation of a single algorithm is hardly ever big enough a project for long compilation times to become a serious problem, so this seems like an acceptable tradeoff to me.
- berkut 10y agoHow do you then give say 20GB of test production data in a packed structure to ML? Re-write thousands of lines of C++ infrastructure into another language just to test it in this "theoretical" language? Or re-use the existing code and write a slightly hacky prototype within the code which can close to effortlessly run any data the program creates/accepts. I know which one I'd pick.