Confirming on not seeing recursion limit warnings :)

I tried various examples on PerlMonks. Getting WARNINGs with PDL 2.079 running demonstration 11115875. That was not the case before when the example was created.

WARNING: PDL::Primitive::vsearch_insert_leftmost does not handle bad v +alues. WARNING: PDL::Primitive::vsearch_insert_leftmost does not handle bad v +alues. ...

Unfortunately, vr's serial demonstration 11116069 runs poorly; 42s versus 19s targ(1). It requires disabling auto-parallelization.

PDL::set_autopthread_targ(1);

Using the 2nd example (the one for Windows, but also runs on UNIX) 11116094, there is no improvement beyond 8 workers on the Windows platform. On Linux, no problem where more workers up to the number of logical cores improves performance (less time). So I updated the code to cap at 8 workers max on Windows. Strawberry Perl 5.32.1.1 PDL edition (w/ included PDL 2.021) is noticeably faster versus PDL 2.079. Is that the case for you?

PDL 2.021 using Strawberry Perl 5.32.1.1 PDL edition (max 8 workers on + Windows) perl demo_win.pl 1e7 : 3.778 seconds perl demo_win.pl 1e8 : 37.008 seconds PDL 2.079 using Strawberry Perl 5.32.1.1 PDL edition (PDL updated to 2 +.079) perl demo_win.pl 1e7 : 4.143 seconds perl demo_win.pl 1e8 : 42.302 seconds

I ran the same demonstration on Ubuntu Linux 20.04 using Perl 5.30.0 and PDL 2.079.

perl demo_win.pl 1e7 : 3.288 seconds ( 8 workers) perl demo_win.pl 1e8 : 41.899 seconds perl demo_win.pl 1e7 : 2.331 seconds (16 workers) perl demo_win.pl 1e8 : 23.329 seconds perl demo_win.pl 1e7 : 1.642 seconds (24 workers) perl demo_win.pl 1e8 : 16.941 seconds perl demo_win.pl 1e7 : 1.310 seconds (32 workers) perl demo_win.pl 1e8 : 13.198 seconds perl demo_win.pl 1e7 : 1.139 seconds (40 workers) perl demo_win.pl 1e8 : 10.925 seconds perl demo_win.pl 1e7 : 1.004 seconds (48 workers) perl demo_win.pl 1e8 : 9.791 seconds perl demo_win.pl 1e7 : 0.946 seconds (56 workers) perl demo_win.pl 1e8 : 8.913 seconds perl demo_win.pl 1e7 : 0.877 seconds (64 workers) perl demo_win.pl 1e8 : 8.305 seconds

In reply to Re^9: Optimizing with Caching vs. Parallelizing (MCE::Map) (PDL: faster) by marioroy
in thread Optimizing with Caching vs. Parallelizing (MCE::Map) by 1nickt

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.