Reputation
3,486
Top tag
Next privilege 5,000 Rep.
Approve tag wiki edits
Badges
1 14 49
Impact
~56k people reached

Jan
8
comment How to compile procedural program effectively
@xslittlegrass well, you just have to tell it. Don't be that lazy, to give the final result : )
Jan
8
comment How to compile procedural program effectively
@xslittlegrass Why turn off the optimization?
Jan
8
comment How to compile procedural program effectively
and I forgot to put RuntimeOption->"Speed" timing, with this option, f4 takes 0.393sec
Jan
8
comment How to compile procedural program effectively
basically, if compiled with ifort on intel cpu, even RuntimeOptions->"Speed" is still more than 10x slower than fortran
Jan
8
comment How to compile procedural program effectively
Hi, blochwave, if you are interested in fortran timing, see my comment to xslittlegrass
Jan
8
comment How to compile procedural program effectively
Are you sure that mma is only 7x slower than fortran? Which fortran compiler do you use? If you use intel cpu, you should choose intel fortran, you will be astonished by the result. On my computer, f4 takes 1.43sec, while your fortran code if compiled with gfortran, takes 0.2sec, But if compiled with ifort, only 0.0268sec !!!!! Be caution, you should add an output code to get the real time, or ifort is smart enough to know that you didn't output anything, so it will just doesn't do anything.
Jan
7
revised Is it possible to prohibit unnecessary CopyTensor in Compile? Just like .noalias() in Eigen library?
added 14 characters in body
Jan
7
comment Is it possible to prohibit unnecessary CopyTensor in Compile? Just like .noalias() in Eigen library?
@MichaelE2 What if they are in a loop, and there are many such dot and assignment?
Jan
7
asked Is it possible to prohibit unnecessary CopyTensor in Compile? Just like .noalias() in Eigen library?
Jan
4
comment How to compile effectively?
@LeonidShifrin Thank you, I understand
Jan
4
comment How to compile effectively?
@LeonidShifrin Hi, Leonid, what about CoerceTensor, What does it do? Should CoerceTensor also be avoided?
Jan
4
comment How well does Mathematica code exported to C compare to code directly written for C?
@Szabolcs Oops, I can't stand myself, too many typos. Thank you.
Jan
4
comment How well does Mathematica code exported to C compare to code directly written for C?
@Szabolcs CompilerGetElement[]` is not working in mma 10.3, where is it now?
Jan
4
comment different situations with Compilation of ConstantArray
Thank you for clarifying this. Actually I tried FullForm[A;B;C] and can't see CompundExpression. Now I understand.
Jan
4
comment The first Chinese word always becomes a question mark, what is wrong with my mathematica?
@xzczd Actually, I just found it automatically back to normal after so many days, I have no idea what has happened ╮(╯▽╰)╭
Jan
4
comment different situations with Compilation of ConstantArray
accpet your answer,+1. For CompoundExpression, do you mean for A;B;C, it is actually CompoundExpression[A,B,C], so A is in 2nd level?
Jan
4
accepted different situations with Compilation of ConstantArray
Jan
3
reviewed Approve How to avoid 0 OverVector[F] to be evaluated as 0?
Jan
3
comment LibraryLink Documentation
@halirutan I am trying to learn library link these days. Just as you said, the official documentation sucks, and also my IQ. I just got errors and errors, when I write on my own. Do you have good resources which can make the learning not such painful? :)
Jan
2
comment different situations with Compilation of ConstantArray
@jkuczm Wow, your deepEvaluate is extremely useful in Compile. Thanks so much for sharing. Would you like to make it an answer and add some explanation?