[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [OF miscellaneous] Hilbert curve: recursion faster than loop?
From: |
Juan Pablo Carbajal |
Subject: |
Re: [OF miscellaneous] Hilbert curve: recursion faster than loop? |
Date: |
Mon, 7 Aug 2017 15:03:12 +0200 |
Wow, I tried
z = complex (zeros (nz(end),order+1));
for k = 1:order
idx = 1:nz(k);
w = i * conj (z(idx,k));
z(1:nz(k+1),k+1) = [w-a; z(idx,k)-b; z(idx,k)+a; -w+b] / 2;
endfor
that is I use the columns of the matrix to store the intermediate
results and it is even more expensive!
24 ms [3 ms]
Any clues who's the culprit? Is it the assignation?
- [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, 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?,
Juan Pablo Carbajal <=