News for hackers. Stuff that matters.
Re:Mastering Nim – now available on Amazon by zimpenfish on Thursday June 30, 2022 @07:00AM (#31930875)
I'm assuming this must be for huge projects?

I just compiled my toy project (detecting anomalous parity in integers) in nim 1.6.6 (4.23s), go 1.17.7 (2.43s to create both aarch64 and x86_64 binaries), zig 0.8.0-dev.1140 (2.04s to create aarch64 and x86_64 binaries) and C via clang 13.1.6 (0.14s).

nim's compilation is 175% of Go, 207% of zig, and 3021% of clang.

Re:Mastering Nim – now available on Amazon by machinekob on Thursday June 30, 2022 @03:33PM (#31937428)
how are u compiling (optimization, custom compilation flags etc.?) In my case https://github.com/mratsim/Arraymancer big project compile under your 4.2s so or you have like 10k+ lines of codes with macros or you just pass some debug flags to compiler :D
Re:Mastering Nim – now available on Amazon by zimpenfish on Friday July 01, 2022 @04:53PM (#31952732)
Compilation command is:

    nim c -d:release --passC:"-flto" --gc:markAndSweep --out:ap ap.nim
I will add that once it's been run a few times, it does go a bit quicker (down to ~0.7s) but the Go also gets quicker (down to 0.28s for two outputs when files are cached.)
Re:Mastering Nim – now available on Amazon by nimmer on Thursday June 30, 2022 @07:17AM (#31931007)
No, even small files. You must have issues with your setup. Are you sure your compiler is not built in debug mode?
Re:Mastering Nim – now available on Amazon by zimpenfish on Thursday June 30, 2022 @07:46AM (#31931196)
How would I check that? I installed it through homebrew via https://github.com/Homebrew/homebrew-core/blob/HEAD/Formula/... which doesn't seem to mention debug mode anywhere?
Re:Mastering Nim – now available on Amazon by dom96 on Thursday June 30, 2022 @12:40PM (#31935098)
Run `nim -v`, if it's not in debug mode you should see "active boot switches: -d:release".
Re:Mastering Nim – now available on Amazon by zimpenfish on Thursday June 30, 2022 @02:07PM (#31936221)
Looks like it isn't in debug mode after all.

    $ nim -v
    Nim Compiler Version 1.6.6 [MacOSX: arm64]
    Compiled at 2022-05-05
    Copyright (c) 2006-2021 by Andreas Rumpf
    
    active boot switches: -d:release -d:nimUseLinenoise
Re:Mastering Nim – now available on Amazon by Rochus on Thursday June 30, 2022 @07:06AM (#31930930)
Thanks for the data; that's what I call an elegant rebuttal.