On 18/10/16 07:04, Daniel Kozak via Digitalmars-d-learn wrote:
> dub run --build=release --compiler=ldc
on my machine i get the following output (using ldc2)
ldc2 --version 09:32
LDC - the LLVM D compiler (1.0.0):
based on DMD v2.070.2 and LLVM 3.8.1
built with LDC - the LLVM D compiler
Dne 17.10.2016 v 23:40 Christian Köstlin via Digitalmars-d-learn napsal(a):
Could someone check the numbers on another OS-X machine? Unfortunately I
only have one available.
Thanks in advance!
Can you try it on OSX with ldc compiler:
dub run --build=release --compiler=ldc
On 17/10/16 14:44, Christian Köstlin wrote:
> On 17/10/16 14:09, Daniel Kozak via Digitalmars-d-learn wrote:
>> Dne 16.10.2016 v 10:41 Christian Köstlin via Digitalmars-d-learn napsal(a):
>>> Hi,
>>>
>>> for an exercise I had to implement a thread safe counter.
>>> This is what I came up with:
>>>
On 17/10/16 14:09, Daniel Kozak via Digitalmars-d-learn wrote:
> Dne 16.10.2016 v 10:41 Christian Köstlin via Digitalmars-d-learn napsal(a):
>> Hi,
>>
>> for an exercise I had to implement a thread safe counter.
>> This is what I came up with:
>>
>>
>> btw. I run the code with dub run
Dne 16.10.2016 v 10:41 Christian Köstlin via Digitalmars-d-learn napsal(a):
Hi,
for an exercise I had to implement a thread safe counter.
This is what I came up with:
btw. I run the code with dub run --build=release
Thanks in advance,
Christian
So I have done some testing, on my pc:
On Monday, 17 October 2016 at 06:38:08 UTC, Daniel Kozak wrote:
Dne 17.10.2016 v 07:55 Christian Köstlin via
Digitalmars-d-learn napsal(a):
[...]
I am still unable to get your java code working:
[kozak@dajinka threads]$ ./gradlew clean build
:clean
:compileJava
:processResources UP-TO-DATE
Dne 17.10.2016 v 07:55 Christian Köstlin via Digitalmars-d-learn napsal(a):
to run java call ./gradlew clean build
->
counter.AtomicIntCounter@25992ae3 expected: 200 got: 100 in: 22ms
counter.AtomicLongCounter@2539f946 expected: 200 got: 100 in: 17ms
On 17/10/16 06:55, Daniel Kozak via Digitalmars-d-learn wrote:
> Dne 16.10.2016 v 10:41 Christian Köstlin via Digitalmars-d-learn napsal(a):
>
>> My question now is, why is each mutex based thread safe variant so slow
>> compared to a similar java program? The only hint could be something
>>
On 16/10/16 19:50, tcak wrote:
> On Sunday, 16 October 2016 at 08:41:26 UTC, Christian Köstlin wrote:
>> Hi,
>>
>> for an exercise I had to implement a thread safe counter. This is what
>> I came up with:
>>
>> [...]
>
> Could you try that:
>
> class ThreadSafe3Counter: Counter{
> private long
Dne 16.10.2016 v 10:41 Christian Köstlin via Digitalmars-d-learn napsal(a):
My question now is, why is each mutex based thread safe variant so slow
compared to a similar java program? The only hint could be something
like:
On Sunday, 16 October 2016 at 08:41:26 UTC, Christian Köstlin
wrote:
Hi,
for an exercise I had to implement a thread safe counter. This
is what I came up with:
[...]
Could you try that:
class ThreadSafe3Counter: Counter{
private long counter;
private core.sync.mutex.Mutex mtx;
11 matches
Mail list logo