5 ms·
(Note: I haven't tried Julia yet) This would save so many man hours... At my shop, for every MATLAB engineer (mostly older guys) you need a C++ guru (mostly yo
by blah32497 13y ago
(Note: I haven't tried Julia yet)
This would save so many man hours... At my shop, for every MATLAB engineer (mostly older guys) you need a C++ guru (mostly younger guys) to translate his stuff into something that will run fast.
On the other hand having seen the code the MATLAB folks write... I'd be worried. It's possible to write MATLAB in a way that is clean and makes the core algorithm presentable but that's rarely a priority. The real advantage of MATLAB is the quick development cycle. With the right packages you can make C++ look comparable... sorta.
Fundamentally the problem with MATLAB engineers is that they don't understand how to optimize code b/c they don't understand what's going on under the hood and they don't understand how to organize code b/c they don't have a concept of object oriented development, writing to interfaces, design patterns etc. etc.
EDIT: Just to clarify, I don't mean to denigrate MATLAB engineers. I'm just saying that in the current system you have two groups that specialize in different things. One focuses on algorithm development, and one on programming. I'm just speculating that maybe there is a good reason for it, and it may be unreasonable to ask one person to do both.
- StefanKarpinski 13y agoThis is why one of the design goals of Julia is to have a fairly transparent performance model. In particular, if you write C-like code, you get C-like performance. A lot of the most twisted and impenetrable Matlab code exists because Matlab forces you to vectorize everything to get acceptable performance. Generic programming and design are also very important in Julia. It takes a while to get the hang of it, but people do seem to after a little bit.
- Blahah 13y agoIs there a guide to performance optimisation in Julia anywhere?
- StefanKarpinski 13y agoIt's by no means comprehensive, but http://docs.julialang.org/en/latest/manual/performance-tips/ http://docs.julialang.org/en/latest/manual/performance-tips/ is a decent start. http://docs.julialang.org/en/latest/stdlib/profile/#stdlib-profiling http://docs.julialang.org/en/latest/stdlib/profile/#stdlib-p... is also helpful.
- Beliavsky 13y agoFortran 90 and later versions of Fortran have array operations, as in Matlab, but you can also write loops and have the compiler optimize the code. There already is a high-level language for scientific computing with C-like performance.
- m_mueller 13y agoPeople often sneer at Fortran, but there's a lot that can be done with it in scientific computing, including very performant GPGPU computing. That being said, the dream of having a matlab like prototyping environment directly result in production level HPC code is probably never going to be realised in Fortran - maybe Julia will get there? All I can say is that the tooling needs to be top notch for that to happen and the performance can't just be in the order of magnitude of Fortran/C - it needs to be within 20% or so. Once you run software on clusters that cost millions, programmer time becomes rather cheap, especially in academic settings.
- gfodor 13y agoSure, but I guess the question is if the the MATLAB-oriented engineers don't have these skills because of the way things work now. If they had Julia, they could still throw together their hacky prototype but then, in the same environment, slowly learn how to refactor it into an appropriate structure for long term maintainability and production use. Currently, the path to learn this facet of software engineering has a huge gating function, "Learn C++", so it's unsurprising that the path of least resistance is for them to just throw their MATLAB scripts over the fence to the C++ folks.
- blah32497 13y agoI totally see your point and for a lot of people what you're saying will resonate (I can see this really catching on with gradstudents), but the question really boils down to: do you really want your engineers spending time learning these things? From what I've seen - it's incredibly hard to find a good engineer that knows his stuff. They generally have PhDs and years of training in math and whatever particular field they work on. If you get one that is actually doing novel algorithm development, each one is a golden goose that will bring in revenue for the company for years to come. By contrast if you offer a decent salary you can get a good C++ programmer with 3-4 years of experience to do all your C++ grunt work. (we hire CS students from the local University, and bring them up to speed within 6 months) While not incredibly hard, the problem with learning "appropriate structure for long term maintainability and production use" is that it takes an awfully long amount of time. You need to go through a lot of trial and error and learning from your mistakes. You need to read programming textbooks, and keep up with the latest trends. It's actually a huge time investment.
- maguirre 13y agoWhat about code generation tools that matlab has been providing for the past few years? When I left the automotive industry the adoption of these tools seemed like a sure thing