This type of performance, especially on a memory
limited platform, is characteristic of cache or
memory thrashing. Since PDL works a piddle at a
time, the temps are piddle sized which means a
lot of temps can push you past the cache/memory
boundary leading to thrashing/swapping. The perl
array, by comparison, has temps of size order a
single element and not thousands or milions.
Caveat swaptor.....
Cheers,
Chris
On 7/9/2010 10:53 AM, P Kishor wrote:
>
> This kinda worries me. If we write-up the gotchas and the limits
> between which PDL use is optimal, then it is "caveat emptor" and all
> that. However, on a more realistic front, I was hoping to use PDL with
> a 13 million elements piddle. I did some tests, and I found that a 2D
> piddle where ("first D" * "second D") = 13 million, PDL was smokingly
> fast. I am wondering though -- will its performance change if the
> piddle was a 1D piddle that was 13 million elements long? Does it
> matter to PDL if my dataset is a "long rope" vs. a "carpet", but both
> with the same "thread count" (to use a fabric analogy)?
>
> Test results (reformatted) shown below
>
>
> count: 10000
> ============================
> Perl PDL
> ----------------------------
> make data: 0.0097 0.0065
> calculate: 0.0064 0.0014
>
> make data: 0.0106 0.0065
> calculate: 0.0064 0.0014
>
> make data: 0.0104 0.0065
> calculate: 0.0063 0.0014
> ____________________________
>
>
> count: 100000
> ============================
> Perl PDL
> ----------------------------
> make data: 0.0962 0.0791
> calculate: 0.0624 0.0108
>
> make data: 0.0966 0.0811
> calculate: 0.0621 0.0109
>
> make data: 0.0966 0.0789
> calculate: 0.0626 0.0109
> ____________________________
>
>
> count: 1000000
> ============================
> Perl PDL
> ----------------------------
> make data: 0.9626 0.8014
> calculate: 0.6269 0.1170
>
> make data: 0.9656 0.8064
> calculate: 0.6275 0.1182
>
> make data: 0.9643 0.8203
> calculate: 0.6275 0.1168
> ____________________________
>
>
> count: 2000000
> ============================
> Perl PDL
> ----------------------------
> make data: 1.7542 1.5168
> calculate: 1.2462 0.2381
>
> make data: 1.7519 1.5221
> calculate: 1.2500 0.2391
>
> make data: 1.7517 1.5226
> calculate: 1.2699 0.2394
> ____________________________
>
>
> count: 3000000
> ============================
> Perl PDL
> ----------------------------
> make data: 2.5263 2.5722
> calculate: 1.9163 3.2107
>
> make data: 2.5411 2.2062
> calculate: 1.8897 6.9557
>
> make data: 2.5305 2.2822
> calculate: 1.9204 7.2502
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl