math.log() benchmark of first 1 billion int using std.parallelism
John Colvin via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Tue Dec 23 04:25:00 PST 2014
On Monday, 22 December 2014 at 17:16:49 UTC, Iov Gherman wrote:
> On Monday, 22 December 2014 at 17:16:05 UTC, bachmeier wrote:
>> On Monday, 22 December 2014 at 17:05:19 UTC, Iov Gherman wrote:
>>> Hi Guys,
>>>
>>> First of all, thank you all for responding so quick, it is so
>>> nice to see D having such an active community.
>>>
>>> As I said in my first post, I used no other parameters to dmd
>>> when compiling because I don't know too much about dmd
>>> compilation flags. I can't wait to try the flags Daniel
>>> suggested with dmd (-O -release -inline -noboundscheck) and
>>> the other two compilers (ldc2 and gdc). Thank you guys for
>>> your suggestions.
>>>
>>> Meanwhile, I created a git repository on github and I put
>>> there all my code. If you find any errors please let me know.
>>> Because I am keeping the results in a big array the programs
>>> take approximately 8Gb of RAM. If you don't have enough RAM
>>> feel free to decrease the size of the array. For java code
>>> you will also need to change 'compile-run.bsh' and use the
>>> right memory parameters.
>>>
>>>
>>> Thank you all for helping,
>>> Iov
>>
>> Link to your repo?
>
> Sorry, forgot about it:
> https://github.com/ghermaniov/benchmarks
For posix-style threads, a per-thread workload of 200 calls to
log seems rather small. It would interesting to see a graph of
execution-time as a function of workgroup-size.
Traditionally one would use a workgroup size of (nElements /
nCores) or similar, in order to get all the cores working but
also minimise pressure on the scheduler, inter-thread
communication and so on.
More information about the Digitalmars-d-learn
mailing list