When the author compares the number of CPU instructions that sprintf compiles to in both C and Julia, he fails to take into account dynamic linking in C: jmp __sprintf_chk I would guess that another few hundred instructions run as a result of this jmp. Thus, the difference in the number of instructions that C's sprintf and Julia's @sprintf compile to are not as drastic as the author makes it seem.
Giving up on Julia
21–30 of 242 posts
Re: Giving up on Julia
#22Happy to address these points: - Startup performance/memory usage Yes, we are definitely very acutely aware of these. Julia is not currently optimized for frequently run short scripts. That's the price on pays for having to bring up the entire runtime system (initializing the compiler, RNG, external libraries etc). The good news is that there will be a solution to this soon, which is to statically compile your julia…
// Construct matrix. Elements are not initialized.
// To initialize all elements to zero use
// Matrix a(2, 2, 0.0).
Matrix a(2, 2);
// Assign elements to first row using
// Fortran-style one-based indexing.
a(1,1) = 0.5; a(1,2) = 1.0;
// Assign elements to second row using
// C-style zero-based indexing.
a[1][0] = 1.5; a[1][1] = 2.0;
-- http://www.b-a-h.com/software/cpp/scppnt.htmlRe: Giving up on Julia
#23Earlier quoted context omitted.
Yeah the poor performance in this blog post is a total misunderstanding of why and how julia is performant. Is printing "hello world" fast really that important? OK. Then don't use Julia. You pay for it by having the compiler JIT the code in a highly optimized fashion. If you have actual numerical calculations that are compile-once, run-many-many-many-times, then you will see a huge performance benefit, amortizing th…
>The goal of Julia is to not have to do that sort of boilerplate/arcane tweaking to get really good performance As someone who is new to python (for bioinformatics), and find python is a fine language... but.. The do it "this way not that way" method of implementation of the same algorithms to get it to run fast makes writing performant python a tedious exercise in research and profiling. The article cited suggests C…
As someone who does that sort of thing I can assure you it isn't. And when I do use C and GPU acceleration, doing so via cython and pyCUDA (and the myriad of libraries that build on cython and pyCUDA) saves massive amounts of time and effort.
That being said I do agree that writing fast python is quite different from writing python, probably more so than in most other languages.
Re: Giving up on Julia
#24Numba package for Python gives you the LLVM JIT for numerical work. I really don't see how Julia is relevant anymore.
Python can be a very useful mess for this sort of work (numerical analysis etc.), and is succeeding at that quite well. In fact, that's it's main challenge to something like Julia. Not design, that ship sailed a long time ago. But practicality and availability of packages and bindings. Once you get too far ahead in that, it's hard to justify using any other platform for "real work", rather than because it's fun to hack on.
Re: Giving up on Julia
#25Happy to address these points: - Startup performance/memory usage Yes, we are definitely very acutely aware of these. Julia is not currently optimized for frequently run short scripts. That's the price on pays for having to bring up the entire runtime system (initializing the compiler, RNG, external libraries etc). The good news is that there will be a solution to this soon, which is to statically compile your julia…
I liked how the Template Numerical Toolkit implemented one-based indexing: // Construct matrix. Elements are not initialized. // To initialize all elements to zero use // Matrix a(2, 2, 0.0). Matrix a(2, 2); // Assign elements to first row using // Fortran-style one-based indexing. a(1,1) = 0.5; a(1,2) = 1.0; // Assign elements to second row using // C-style zero-based indexing. a[1][0] = 1.5; a[1][1] = 2.0; -- http:…
Re: Giving up on Julia
#26If you want to replace Matlab you should use Octave, julia is for making your next climate model, not for "hello world" ricing
Re: Giving up on Julia
#27When the author compares the number of CPU instructions that sprintf compiles to in both C and Julia, he fails to take into account dynamic linking in C: jmp __sprintf_chk I would guess that another few hundred instructions run as a result of this jmp. Thus, the difference in the number of instructions that C's sprintf and Julia's @sprintf compile to are not as drastic as the author makes it seem.
Re: Giving up on Julia
#28But, I think judging a language (which claims math and scientific computing is it's strongest point) by print screen performance is not fair.
And, the authors last example is a little bit misleading I think. The C code sets up registers and jumps to the main sprintf routine. I don't know why didn't he tell that routine's instructions count...
Has any one counted?
Re: Giving up on Julia
#29I love python and I don't like Julia at all. But, I think judging a language (which claims math and scientific computing is it's strongest point) by print screen performance is not fair. And, the authors last example is a little bit misleading I think. The C code sets up registers and jumps to the main sprintf routine. I don't know why didn't he tell that routine's instructions count... Has any one counted?