On Monday, 3 August 2015 at 17:33:30 UTC, aki wrote:
On Monday, 3 August 2015 at 16:47:58 UTC, John Colvin wrote:
changing two lines:
final class SubFoo : Foo {
int test(F)(F obj, int repeat) {
I tried it. DMD is no change, while GDC gets acceptable score.
D(DMD 2.067.1): 2.445
D(GDC
On 3 August 2015 at 18:27, aki via Digitalmars-d
digitalmars-d@puremagic.com wrote:
When I was trying to port some Java program to D,
I noticed Java is faster than D.
I made a simple bench mark test as follows.
Then, I was shocked with the result.
test results on Win8 64bit (smaller is
On 03-Aug-2015 19:27, aki wrote:
When I was trying to port some Java program to D,
I noticed Java is faster than D.
I made a simple bench mark test as follows.
Then, I was shocked with the result.
test results on Win8 64bit (smaller is better)
Java(1.8.0,64bit,server): 0.677
C++(MS vs2013):
On Monday, 3 August 2015 at 16:27:39 UTC, aki wrote:
When I was trying to port some Java program to D,
I noticed Java is faster than D.
I made a simple bench mark test as follows.
Then, I was shocked with the result.
test results on Win8 64bit (smaller is better)
Java(1.8.0,64bit,server): 0.677
On Monday, 3 August 2015 at 16:47:14 UTC, Adam D. Ruppe wrote:
You can try a few potential optimizations in the D version
yourself and see if it makes a difference.
Devirtualization has a very small impact. Test this by making
`test` take `SubFoo` and making `bar` final, or making `bar` a
On 8/3/15 12:50 PM, John Colvin wrote:
On Monday, 3 August 2015 at 16:47:14 UTC, Adam D. Ruppe wrote:
You can try a few potential optimizations in the D version yourself
and see if it makes a difference.
Devirtualization has a very small impact. Test this by making `test`
take `SubFoo` and
On Monday, 3 August 2015 at 16:47:58 UTC, John Colvin wrote:
gets me down to 0.182s with ldc on OS X
Yeah, I tried dmd with the final and didn't get a difference but
gdc with final (and -frelease, very important for max speed here
since without it the method calls are surrounded by various
On 03-Aug-2015 19:54, Steven Schveighoffer wrote:
On 8/3/15 12:50 PM, John Colvin wrote:
On Monday, 3 August 2015 at 16:47:14 UTC, Adam D. Ruppe wrote:
You can try a few potential optimizations in the D version yourself
and see if it makes a difference.
Devirtualization has a very small
On Monday, 3 August 2015 at 16:53:30 UTC, Adam D. Ruppe wrote:
On Monday, 3 August 2015 at 16:47:58 UTC, John Colvin wrote:
gets me down to 0.182s with ldc on OS X
Yeah, I tried dmd with the final and didn't get a difference
but gdc with final (and -frelease, very important for max speed
When I was trying to port some Java program to D,
I noticed Java is faster than D.
I made a simple bench mark test as follows.
Then, I was shocked with the result.
test results on Win8 64bit (smaller is better)
Java(1.8.0,64bit,server): 0.677
C++(MS vs2013): 2.141
C#(MS vs2013): 2.220
D(DMD
On 8/3/15 12:31 PM, Dmitry Olshansky wrote:
On 03-Aug-2015 19:27, aki wrote:
When I was trying to port some Java program to D,
I noticed Java is faster than D.
I made a simple bench mark test as follows.
Then, I was shocked with the result.
test results on Win8 64bit (smaller is better)
On Monday, 3 August 2015 at 16:41:42 UTC, Steven Schveighoffer
wrote:
On 8/3/15 12:31 PM, Dmitry Olshansky wrote:
On 03-Aug-2015 19:27, aki wrote:
When I was trying to port some Java program to D,
I noticed Java is faster than D.
I made a simple bench mark test as follows.
Then, I was shocked
On Monday, 3 August 2015 at 16:27:39 UTC, aki wrote:
When I was trying to port some Java program to D,
I noticed Java is faster than D.
I made a simple bench mark test as follows.
Then, I was shocked with the result.
[...]
What compilation flags?
Java being fastest at running Java-style code is not too surprising. My
guess is that Java is hotspot inlining the calls to `bar`, getting rid
of the dynamic dispatch overhead. I think that for real systems D will
generally beat out Java across the board, but not if the D version is a
On 8/3/15 12:59 PM, Dmitry Olshansky wrote:
On 03-Aug-2015 19:54, Steven Schveighoffer wrote:
ALSO, make SURE you are compiling in release mode, so you aren't calling
a virtual invariant function before/after every call.
This one is critical. Actually why do we have an extra call for
On Monday, 3 August 2015 at 16:50:42 UTC, John Colvin wrote:
Making SubFoo a final class and test take SubFoo gives a 10x
speedup for me.
Right, gdc and ldc will the the aggressive inlining and local
data optimizations automatically once it is able to devirtualize
the calls (at least when
You can try a few potential optimizations in the D version
yourself and see if it makes a difference.
Devirtualization has a very small impact. Test this by making
`test` take `SubFoo` and making `bar` final, or making `bar` a
stand-alone function.
That's not it.
Inlining alone doesn't
On Monday, 3 August 2015 at 16:47:58 UTC, John Colvin wrote:
changing two lines:
final class SubFoo : Foo {
int test(F)(F obj, int repeat) {
I tried it. DMD is no change, while GDC gets acceptable score.
D(DMD 2.067.1): 2.445
D(GDC 4.9.2/2.066): 0.928
Now I got a hint how to improve the code
On 03-Aug-2015 20:05, Steven Schveighoffer wrote:
On 8/3/15 12:59 PM, Dmitry Olshansky wrote:
On 03-Aug-2015 19:54, Steven Schveighoffer wrote:
ALSO, make SURE you are compiling in release mode, so you aren't calling
a virtual invariant function before/after every call.
This one is
19 matches
Mail list logo