Parallel processing and further use of output
Russel Winder via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Sep 28 05:18:16 PDT 2015
As a single data point:
====================== anonymous_fix.d ==========
500000500000
real 0m0.168s
user 0m0.200s
sys 0m0.380s
====================== colvin_fix.d ==========
500000500000
real 0m0.036s
user 0m0.124s
sys 0m0.000s
====================== norwood_reduce.d ==========
500000500000
real 0m0.009s
user 0m0.020s
sys 0m0.000s
====================== original.d ==========
218329750363
real 0m0.024s
user 0m0.076s
sys 0m0.000s
Original is the original, not entirely slow, but broken :-). anonymous
is the anonymous' synchronized keyword version, slow. colvin_fix is
John Colvin's use of atomicOp, correct but only ok-ish on speed. Jay
Norword first proposed the reduce answer on the list, I amended it a
tiddly bit, but clearly it is a resounding speed winner.
I guess we need a benchmark framework that can run these 100 times
taking processor times and then do the statistics on them. Most people
would assume normal distribution of results and do mean/std deviation
and median.
--
Russel.
=============================================================================
Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder at ekiga.net
41 Buckmaster Road m: +44 7770 465 077 xmpp: russel at winder.org.uk
London SW11 1EN, UK w: www.russel.org.uk skype: russel_winder
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20150928/73090bfc/attachment.sig>
More information about the Digitalmars-d-learn
mailing list