Post Reply 
Fun with Numbers: The Pan-Prime-Digit Cube Hypothesis
08-15-2017, 08:51 PM
Post: #39
RE: Fun with Numbers: The Pan-Prime-Digit Cube Hypothesis
(08-15-2017 12:20 PM)David Hayden Wrote:  As for multithreading, allocating and deallocating memory probably requires a lock so you might want to see if you can avoid that as much as possible.

The author of the BigInteger library I'm using (Rudy Velthuis) mentions in his documentation that the BigInteger instances should be considered immutable, thus resulting in new allocations occurring every time an operation is performed that changes a value. Which, of course, is quite frequently while the main loop of the thread is running. It doesn't appear that there is any way to "pre-allocate" a variable and rewrite its contents. I suspect this is at the heart of the thread contention I've seen.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Fun with Numbers: The Pan-Prime-Digit Cube Hypothesis - DavidM - 08-15-2017 08:51 PM



User(s) browsing this thread: 1 Guest(s)