>
> Suppose I have a code that takes a day to finish after being compiled.  So
> the first run (since it is being compiled) might take say 5 days.  But
> after that 5 days I have got the results and there is no need to run it the
> second time.  So the supposedly fast execution after compile is not going
> to be necessary anyway, and hence provides no benefits.


The only situation in which "run twice" applies is microbenchmarks where
the compilation time exceeds the actual runtime. If the process takes a day
to run, compile time will be a rounding error.

On Tue, Jan 6, 2015 at 9:34 PM, K leo <cnbiz...@gmail.com> wrote:

> Might be slightly off-topic, but closely related.
>
> Does anyone find the logic to run a code first just to compile it and then
> do the real run afterwards somewhat flawed, or am I missing anything?
>
> Suppose I have a code that takes a day to finish after being compiled.  So
> the first run (since it is being compiled) might take say 5 days.  But
> after that 5 days I have got the results and there is no need to run it the
> second time.  So the supposedly fast execution after compile is not going
> to be necessary anyway, and hence provides no benefits.
>
> On Wednesday, January 7, 2015, Christoph Ortner <
> christophortn...@gmail.com> wrote:
>
>> Maybe run
>>
>> test()
>>
>> then
>>
>> tic()
>> testf()
>> toc()
>>
>> so that the code is compiled first? Just a guess
>>
>>    Christoph
>>
>>
>>

Reply via email to