Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread John Colvin via Digitalmars-d-learn
On Tuesday, 23 December 2014 at 07:26:27 UTC, Daniel Kozak wrote: That's very different to my results. I see no important difference between ldc and dmd when using std.math, but when using core.stdc.math ldc halves its time where dmd only manages to get to ~80% What CPU do you have? On my

Re: std.file.readText() extra Line Feed character

2014-12-23 Thread Ali Çehreli via Digitalmars-d-learn
On 12/19/2014 02:22 AM, Colin wrote: On Thursday, 18 December 2014 at 22:29:30 UTC, Ali Çehreli wrote: happy with Emacs :p Does emacs do this aswell? :) Emacs can and does do everything: :) http://www.gnu.org/software/emacs/manual/html_node/emacs/Customize-Save.html Ali

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread Iov Gherman via Digitalmars-d-learn
That's very different to my results. I see no important difference between ldc and dmd when using std.math, but when using core.stdc.math ldc halves its time where dmd only manages to get to ~80% I checked again today and the results are interesting, on my pc I don't see any difference

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread John Colvin via Digitalmars-d-learn
On Tuesday, 23 December 2014 at 10:20:04 UTC, Iov Gherman wrote: That's very different to my results. I see no important difference between ldc and dmd when using std.math, but when using core.stdc.math ldc halves its time where dmd only manages to get to ~80% I checked again today and the

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread Iov Gherman via Digitalmars-d-learn
These multi-threaded benchmarks can be very sensitive to their environment, you should try running it with nice -20 and do multiple passes to get a vague idea of the variability in the result. Also, it's important to minimise the number of other running processes. I did not use the nice

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread Daniel Kozak via Digitalmars-d-learn
On Tuesday, 23 December 2014 at 10:39:13 UTC, Iov Gherman wrote: These multi-threaded benchmarks can be very sensitive to their environment, you should try running it with nice -20 and do multiple passes to get a vague idea of the variability in the result. Also, it's important to minimise

Re: ini library in OSX

2014-12-23 Thread Robert burner Schadek via Digitalmars-d-learn
as you properly know, ini files don't support sections arrays. If you know all items at compile time, you could create structs for all of them, but that is properly not what you're looking for.

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread Daniel Kozak via Digitalmars-d-learn
On Tuesday, 23 December 2014 at 10:20:04 UTC, Iov Gherman wrote: That's very different to my results. I see no important difference between ldc and dmd when using std.math, but when using core.stdc.math ldc halves its time where dmd only manages to get to ~80% I checked again today and the

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread John Colvin via Digitalmars-d-learn
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

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread Iov Gherman via Digitalmars-d-learn
And what about single threaded version? Just ran the single thread examples after I moved time start before array allocation, thanks for that, good catch. Still better results in Java: - java: 21 secs, 612 ms - with std.math: dmd: 23 secs, 994 ms ldc: 31 secs, 668 ms gdc: 52 secs, 576 ms

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread Iov Gherman via Digitalmars-d-learn
Btw. I just noticed small issue with D vs. java, you start messure in D before allocation, but in case of Java after allocation Here is the java result for parallel processing after moving the start time as the first line in main. Still best result: 4 secs, 50 ms average

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread Iov Gherman via Digitalmars-d-learn
Forgot to mention that I pushed my changes to github.

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread via Digitalmars-d-learn
On Tuesday, 23 December 2014 at 12:26:28 UTC, Iov Gherman wrote: And what about single threaded version? Just ran the single thread examples after I moved time start before array allocation, thanks for that, good catch. Still better results in Java: - java: 21 secs, 612 ms - with

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread Daniel Kozak via Digitalmars-d-learn
On Tuesday, 23 December 2014 at 12:31:47 UTC, Iov Gherman wrote: Btw. I just noticed small issue with D vs. java, you start messure in D before allocation, but in case of Java after allocation Here is the java result for parallel processing after moving the start time as the first line in

Is D's GC.calloc and C's memset played the same role?

2014-12-23 Thread FrankLike via Digitalmars-d-learn
Today,I meet a question:get all processes names. --C++ CODE- #include stdafx.h #include windows.h #include stdio.h//C standard I/O #include tlhelp32.h int _tmain(int argc, _TCHAR* argv[]) { HANDLE hProcessSnap=CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS,0);

Re: Is D's GC.calloc and C's memset played the same role?

2014-12-23 Thread Daniel Kozak via Digitalmars-d-learn
FrankLike via Digitalmars-d-learn píše v Út 23. 12. 2014 v 15:37 +: Today,I meet a question:get all processes names. --C++ CODE- #include stdafx.h #include windows.h #include stdio.h//C standard I/O #include tlhelp32.h int _tmain(int argc, _TCHAR* argv[])

Re: Is D's GC.calloc and C's memset played the same role?

2014-12-23 Thread ketmar via Digitalmars-d-learn
On Tue, 23 Dec 2014 15:37:12 + FrankLike via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: you will find the different: D: PROCESSENTRY32* pe32 = cast(PROCESSENTRY32*)GC.calloc(PROCESSENTRY32.sizeof); C++:PROCESSENTRY32 pe32; GC.calloc means: memset ?! do you see

Re: math.log() benchmark of first 1 billion int using std.parallelism

2014-12-23 Thread via Digitalmars-d-learn
I'm getting faster execution on java thank dmd, gdc beats it though. ...although, what this topic really provides is a reason for me to get more RAM for my next laptop. How much do you people run with? I had to scale the java down to 300 million to avoid dying with 4G memory.

Storing arrays as Variant types.

2014-12-23 Thread Winter M. via Digitalmars-d-learn
I've run into a problem while trying to coerce array values from a variant; specifically, char[] a = aVariant.coerce!(char[]); // This works just fine. byte[] b = bVariant.coerce!(byte[]); // This causes a static assertion to fail. I'm not really sure why a byte[] would be an unsupported

Re: Storing arrays as Variant types.

2014-12-23 Thread Ali Çehreli via Digitalmars-d-learn
Minimal code for convenience to others: import std.variant; void main() { Variant aVariant; Variant bVariant; char[] a = aVariant.coerce!(char[]); byte[] b = bVariant.coerce!(byte[]); } On 12/23/2014 02:57 PM, Winter M. wrote: I've run into a problem while trying to coerce

Re: Storing arrays as Variant types.

2014-12-23 Thread ketmar via Digitalmars-d-learn
On Tue, 23 Dec 2014 22:57:07 + Winter M. via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: I've run into a problem while trying to coerce array values from a variant; specifically, char[] a = aVariant.coerce!(char[]); // This works just fine. byte[] b =

Re: Is D's GC.calloc and C's memset played the same role?

2014-12-23 Thread FrankLike via Digitalmars-d-learn
On Tuesday, 23 December 2014 at 20:22:12 UTC, ketmar via Digitalmars-d-learn wrote: On Tue, 23 Dec 2014 15:37:12 + FrankLike via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: you will find the different: D: PROCESSENTRY32* pe32 =

Re: Is D's GC.calloc and C's memset played the same role?

2014-12-23 Thread ketmar via Digitalmars-d-learn
On Wed, 24 Dec 2014 00:24:44 + FrankLike via Digitalmars-d-learn digitalmars-d-learn@puremagic.com wrote: On Tuesday, 23 December 2014 at 20:22:12 UTC, ketmar via Digitalmars-d-learn wrote: On Tue, 23 Dec 2014 15:37:12 + FrankLike via Digitalmars-d-learn

Getting DAllegro 5 to work in Windows

2014-12-23 Thread Joel via Digitalmars-d-learn
I can't get implib.exe (http://ftp.digitalmars.com/bup.zip) to produce .lib files from dlls (https://www.allegro.cc/files/). I think it works for other people. Thanks for any help.