I am developing a 32-bit Windows application using Delphi XE3
I have a section code that carries out detailed computation that needs speeding up and can be run in multiple threads
I have designed it so that there is no need to use Mutex's or Critical Sections to control access while the individual threads run.
I make no attempt to set affinity or suggest ideal processor to use
The analysis takes about 1 minute in a single thread
The analysis takes about 40 seconds using multiple threads using all 6 available cores - i was expecting closer to 15-20 seconds (accepting some performance loss as inevitable)
Looking at the CPU performance .. the application does not seem to be using the full 6 cores.
If I replace the analysis code with a simple loop counter to burn CPU time I see full core usage .. and close to 6x speed improvement
So I suspect there is something in the analysis code that is causing threads to wait for each other.
The analysis does make extensive use of lists and creates new objects to put in these lists.
Are there implicit mutex/critical section issues associated with object creation/memory usage that might explain the lack of performance ?
Are there any good tips that might help unlock this performance issue?
Many thanks in anticipation for your thoughts/help
More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Does the idea of dealing with bits scare or confuse you? Does it seem like a waste of time in an age where we all have terabytes of storage? If so, you're missing out on one of the core tools in every professional programmer's toolbox. Learn how to …
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program.
Download Eclipse installation zip file:
Extract files from zip file:
Download and install JDK 8:
Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…