[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [OF miscellaneous] Hilbert curve: recursion faster than loop?
From: |
siko1056 |
Subject: |
Re: [OF miscellaneous] Hilbert curve: recursion faster than loop? |
Date: |
Mon, 7 Aug 2017 05:10:59 -0700 (PDT) |
jbect wrote
>
> Juan Pablo Carbajal wrote
>> for i=1:100; tic; hilbert_curve_nr(9,true); t(i)=toc; end; [mean(t)
>> std(t)]
>> ans =
>>
>> 0.0088032 0.0024393
>>
>> for i=1:100; tic; hilbert_curve_nr(9,false); t(i)=toc; end; [mean(t)
>> std(t)]
>> ans =
>>
>> 0.0065030 0.0018694
>>
>> for i=1:100; tic; hilbert_curve(2^9); t(i)=toc; end; [mean(t) std(t)]
>> ans =
>>
>> 1.9476e-03 8.0688e-04
> Octave 4.0.1
>
> 7.34 ms [0.11 ms]
> 4.73 ms [0.06 ms]
> 1.27 ms [0.03 ms]
>
> Octave 4.3.0+
>
> 7.61 ms [0.16 ms]
> 4.82 ms [0.05 ms]
> 1.42 ms [0.03 ms]
>
> Matlab R2016b
>
> 8.65 ms [0.58 ms]
> 2.98 ms [0.10 ms]
> 1.30 ms [0.08 ms]
Same figures here except for nuances using Octave 4.3.0+ and Matlab R2017a
as Juan and jbect got.
--
View this message in context:
http://octave.1599824.n4.nabble.com/OF-miscellaneous-Hilbert-curve-recursion-faster-than-loop-tp4684339p4684363.html
Sent from the Octave - General mailing list archive at Nabble.com.
- [OF miscellaneous] Hilbert curve: recursion faster than loop?, JuanPi, 2017/08/05
- Re: [OF miscellaneous] Hilbert curve: recursion faster than loop?, siko1056, 2017/08/06
- Re: [OF miscellaneous] Hilbert curve: recursion faster than loop?, Juan Pablo Carbajal, 2017/08/07
- Re: [OF miscellaneous] Hilbert curve: recursion faster than loop?, Juan Pablo Carbajal, 2017/08/07
- Re: [OF miscellaneous] Hilbert curve: recursion faster than loop?, siko1056, 2017/08/07
- Re: [OF miscellaneous] Hilbert curve: recursion faster than loop?, Juan Pablo Carbajal, 2017/08/07
- Re: [OF miscellaneous] Hilbert curve: recursion faster than loop?, Julien Bect, 2017/08/07
- Re: [OF miscellaneous] Hilbert curve: recursion faster than loop?,
siko1056 <=
- Re: [OF miscellaneous] Hilbert curve: recursion faster than loop?, Juan Pablo Carbajal, 2017/08/07
- Re: [OF miscellaneous] Hilbert curve: recursion faster than loop?, Juan Pablo Carbajal, 2017/08/07