3 ms·
Haha yea that is some straight up Mathematica -> C codegen (damn you //cform). A couple of years ago I inherited a project with a 90 meg .c file that was auto g
by santaclaus 10y ago
Haha yea that is some straight up Mathematica -> C codegen (damn you //cform). A couple of years ago I inherited a project with a 90 meg .c file that was auto generated by Mathematica... the thing caused GCC to allocate ~4 gigs of ram. Simplifying the math by hand we got it down to a few hundred lines of code, and reduced the build time by three orders of magnitude.
- TheRealPomax 10y agohahaha that is amazing!
- bhaak 10y agoPlease, tell me you simplified the math in Mathematica and that you didn't go through the C file manually? If it's the latter, how did you keep your sanity?
- santaclaus 10y agoWe got a couple of big ass whiteboards and carefully went through the math. Lots of big expressions simplified to zero that Mathematica couldn't see, and we were able to factor out a lot of shared expressions.