|
From: | Daniel J Sebald |
Subject: | Re: circular markersizes via rotation matrix |
Date: | Sat, 20 Aug 2016 12:39:58 -0500 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.7.2 |
On 08/19/2016 06:03 PM, Dmitri A. Sergatskov wrote:
On Fri, Aug 19, 2016 at 4:22 PM, Rik <address@hidden <mailto:address@hidden>> wrote: -- Benchmark # 1 -- N = 128; bm = zeros (N, 1); clf; for i = 1:N tic; plot (1:10, "o", "markersize", N); bm(i) = toc; endfor mean (bm) -- End Benchmark # 1 -- I tried this benchmark for "o", ".", "x", and "*" symbols and N=1280. All results were pretty much the same (0.0175). Which pretty much tells me that the most of the time spent elsewhere (not calculating the symbol shape).
Correct. For what it's worth, here's a C program to illustrate the difference. I think it is a apples-to-apples comparison, and it seems about right in terms of what goes into computing a sinusoidal value. For one million circle computations, I'm seeing:
sebald@ ~/octave/nontrig_circle_symbol $ ./testcircle sz=12 div=3 alg=trig real 0m1.393s user 0m1.392s sys 0m0.000s sz=100 div=27 alg=trig real 0m6.185s user 0m6.180s sys 0m0.000s sz=12 div=3 alg=matrot real 0m0.113s user 0m0.112s sys 0m0.000s sz=100 div=27 alg=matrot real 0m0.382s user 0m0.380s sys 0m0.000s Dan
nontrig_circle_symbol.zip
Description: Zip archive
[Prev in Thread] | Current Thread | [Next in Thread] |