3 ms·
From just my personal experience, I've had a python code interfaced with C that I rewrote just for fun in pure julia. It was significantly slower then the C cod
by sega_sai 5y ago
From just my personal experience, I've had a python code interfaced with C that I rewrote just for fun in pure julia. It was significantly slower then the C code and I couldn't as easily use OPENMP parallelization (although the symbolic derivatives are great). Obviously I know julia much less well, but so far in a few cases I tried, I could not convince myself that julia offers me enough advantages over my current approaches that rely on python & C/C++
- chalst 5y agoAs I guess you're hinting at, writing performant pure Julia is a quite different kettle of fish to writing performant C: it's not surprising that a first attempt isn't a rousing success. But there's a spectrum of rewriting possibilities: you can write Julia-interfaced-with-C as a direct analog of the existing code, and you can convert just those parts of the C code that you think would most benefit from Julia's JIT into Julia, leaving most of the heavy lifting in C.
- ChrisRackauckas 5y agoThis is changing BTW. There's been lots of improvements in escape analysis and hoisting allocations out of loops in the upcoming v1.9 that will start to make "bad codes" a lot less bad. In fact, it's already starting to impact how to write tutorials on what is a bad code haha.