3 ms·
You can't get around the interpreted vs compiles difference (among others) that differentiate Python and C. The discussion is one of code size though, not the o
by ivankirigin 17y ago
You can't get around the interpreted vs compiles difference (among others) that differentiate Python and C. The discussion is one of code size though, not the other differences.
You can make compact and readable C that looks like other language constructs by writing libraries, to a limit.
My point, if I didn't complete it, is one I've mentioned a few times. Libraries matter more than things like LOC count. And it is a really big difference.
I challenge anyone to write an Arc levenberg marquardt minimization in less than 100 LOC. In Matlab (and other languages with good sets of libraries) it is literally just a parameterized function call.
Maybe I'm just too pragmatic for discussions like this.
- jacquesm 17y agoOk, so let me try to spell this out to see if I understand what you mean: You are basically saying that whatever is primitive to the languages is irrelevant because the language that has the best libraries will win such a contest hands down because what needs to be re-implemented in one language is a primitive in the other. That's true as far as I can see, but only for 'domain specific' problems. By running a benchmark that contains samples from many domains it should be possible to average out those factors. Another way to deal with it would be to limit the code to code written in primitives. Still matlab would handily outperform any other language not endowed with primitives for matrix manipulation, but that's exactly the whole point of such a test. To figure out given a problem for a certain domain what would be the most expressive platform to solve the problem in.
- ivankirigin 17y agoAcross many domains, the effect of libraries is exaggerated. Perhaps minimization isn't enough. Let's add image processing, talking to hardware over a serial port, and parsing an xhtml file. Libraries win: image.convolve( filter ) hardware.write( c_struct ) beautifulsoup( xhtml )