Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Wonder if Matlab's C++ auto-generated code is competitive in performance.


It's really good.

I don't have any links or docs but I've used it quite a bit. With a recent of MATLAB, the codegen is good enough that my workflow has become "prototype in MATLAB" -> codegen -> profile then hand optimize. That is, for things which lend themselves well to MATLAB.


That sound fun, what kind of problems do you use it for? I can imagine inner-loop type math stuff but would be leery of larger chunks of code.


Most of the things I'm interested in are signal processing oriented. Things where it's very easy to structure the solution to the problem as dataflow/boxes and arrows. Essentially, "things that lend themselves well to MATLAB" ;-)

(to be more concrete, because I personally hate vague answers when I want specifics) I've done a lot of array processing sound stuff, microphone array processing and calibration, as well as computational music stuff with this framework. Also built a mostly vision-based pipeline this way, calculating how "awake" a mouse is from a video feed for medical applications.

> I can imagine inner-loop type math stuff but would be leery of larger chunks of code.

100%. I'd never structure an application this way, but it's pretty great if you structure your larger code to be modular enough and then have certain processing elements done via codegen from MATLAB. What I love is getting bit-for-bit accuracy with the math from MATLAB. Of course, you then do things to get more performance by sacrificing accuracy, but it's great to start off from a place of knowing with certainty that the math is right.


One thing is that this library has built in support for H-matrices(last I checked Matlab did not), so it can be arbitrarily more efficient if your problem decomposes in a nice way(most matrices in practice have large low rank sections, so this may be a very large class of problems).




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: