Re: [OT] For Andrej Mitrovic, Cairo OpenGL and Windows...

2011-11-25 Thread Andrej Mitrovic
No problem. Are you going to distribute the DLL from somewhere? Btw, is this a private company work or is it a public effort? I'm just wondering what "We" means when you say "We are currently in the process of building..".

Re: Rquest for timings

2011-11-25 Thread Jerry
bearophile writes: > This is the nbody benchmark of the Shootout site: > http://shootout.alioth.debian.org/u32/performance.php?test=nbody > > The faster version is a Fortran one, probably thanks to vector operations > that allow a better SIMD vectorization. > > This is the C++ version: > http://

Re: Optimization in std.algorithm.max?

2011-11-25 Thread Jerry
Jesse Phillips writes: > There is a good possibility that I don't know anything, but is there > something about doing two checks that goes faster? > > static if (isIntegral!(T1) && isIntegral!(T2) >&& (mostNegative!(T1) < 0) != (mostNegative!(T2) < 0)) > s

Re: Rquest for timings

2011-11-25 Thread bearophile
Andrea Fontana Wrote: Yes, really :-) Timings taken with DMD 2.056+, 32 bit Vista OS. Bye, bearophile

Re: [OT] For Andrej Mitrovic, Cairo OpenGL and Windows...

2011-11-25 Thread Paolo Invernizzi
Thank you very much, Andrej Paolo On Nov 24, 2011, at 11:44 PM, Andrej Mitrovic wrote: > OK, it's actually the same samples as the ones using the C API, except > they've been modified to use the OOP CairoD based on a branch that > added OpenGL support. > > In short, the link I gave you is the o

Re: How come a thread can access another thread's stack variable?

2011-11-25 Thread Simen Kjærås
On Fri, 25 Nov 2011 10:34:12 +0100, Christophe wrote: Andrej Mitrovic , dans le message (digitalmars.D.learn:30764), a écrit : import core.thread; import std.stdio; struct Foo { int field; void test() { writeln("field: ", &field); } } void main() { Foo foo;

Re: Rquest for timings

2011-11-25 Thread Andrea Fontana
Really? Dmd version and system? (here: dmd from git, ubuntu 11.10 64bit) ./app 5000 Your version: real0m14.674s My version: real0m13.644s Your version: imd dSquared = dx ^^ 2 + dy ^^ 2 + dz ^^ 2; imd mag = dt / (dSquared * sqrt(dSquared)); My version: imd dSquared = sqrt(dx ^^ 2

Re: Rquest for timings

2011-11-25 Thread bearophile
Andrea Fontana: > Hmm reading code i verified that i can gain a 10% writing: > > imd dSquared = sqrt(dx ^^ 2 + dy ^^ 2 + dz ^^ 2); > imd mag = dt / (dSquared * dSquared^^2); > > Around line 115. Give it a try... My version performs a sqrt and one multipl

Re: Rquest for timings

2011-11-25 Thread Andrea Fontana
Hmm reading code i verified that i can gain a 10% writing: imd dSquared = sqrt(dx ^^ 2 + dy ^^ 2 + dz ^^ 2); imd mag = dt / (dSquared * dSquared^^2); Around line 115. Give it a try... Il giorno gio, 24/11/2011 alle 22.37 -0500, bearophile ha scritto: > T

Re: [OT] For Andrej Mitrovic, Cairo OpenGL and Windows...

2011-11-25 Thread Andrej Mitrovic
I think glitz was dropped from cairo ages ago and replaced with cairo_gl. GL is supported, but it's not precompiled into the DLL on the GTK website which is where people get the Cairo DLL from.

Re: How come a thread can access another thread's stack variable?

2011-11-25 Thread Christophe
Andrej Mitrovic , dans le message (digitalmars.D.learn:30764), a écrit : > import core.thread; > import std.stdio; > > struct Foo > { > int field; > void test() > { > writeln("field: ", &field); > } > } > > void main() > { > Foo foo; > auto thread = new Thread(&foo

Re: [OT] For Andrej Mitrovic, Cairo OpenGL and Windows...

2011-11-25 Thread Dejan Lekic
I was always under the impression that Cairo has transparent OpenGL support if Glitz is enabled. Is that correct?