New to D - playing with Thread and false Sharing

Russel Winder via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 21 23:58:05 PDT 2015


On Thu, 2015-08-20 at 20:01 +0000, tony288 via Digitalmars-d-learn
wrote:
> 
[…]
> Now what I would like to know, how would I make this code more 
> efficient? Which is basically the aim I'm trying to achieve.
> 
> Any pointers would be really help full. Should I use 
> concurrency/parallelism etc..?

I have found very, very few codes (in many different language,
including Java) that were not massively improved by removal of all
explicit thread (and fiber) usage. Threads and fibers are, and should
be, infrastructure for application level APIs. If a language doesn't
have the abstractions then it is deficient and should gain them quickly
or not be used.

I observe that the only programs that need to explicitly use threads
and fibers are the ones that must explicitly manage heap and stack.

-- 
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/20150822/d03148b7/attachment-0001.sig>


More information about the Digitalmars-d-learn mailing list