-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added JANET_NO_AMALG flag to Makefile #1175
Conversation
The speedup is nice 👍 |
The added complexity is ok, since it is not much added complexity. We used to have this, however the requirement for distributing as But a lot has changed and stabilized, I guess I just got use to waiting for the compiler 😅 |
It would probably be sufficient to make the amalgamation a build/ci artifact, right? |
Yes, but the idea was to have one fewer way to build things and I would get PRs that would break the amalgamated build (and break them myself). Basically, it was just one less thing to think about. Still, it's like a breath of fresh air to have incremental compilation nice and fast again. |
Is the current implementation acceptable, in particular the way the option is passed to and handled in boot. janet? Also maybe change NO_AMALG into something nicer like JANET_DISABLE_AMALGAMATION? (I will not be typing that more then once (in my .bashrc only) |
How about |
Current implementation looks good, but it is probably better to have a name that is unlikely to collide with anything as the trigger to avoid surprises. |
source files instead of from the amalgamated janet.c; this considerably speeds up parallel builds on modern CPUs
env var changed to |
I'm curious on what the speed delta would look like when running with a more parallelized linker. (e.g mold) |
Linking really is not the problem, that's typically done in tens of milliseconds for a project this size. |
May be a minor thing but I think the construction (if-not (has-value? boot/args "image-only") (do
(print "\n/* " fname " */")
...)) here might be better expressed as either: (when (not (has-value? boot/args "image-only"))
(print "\n/* " fname " */")
...) or: (unless (has-value? boot/args "image-only")
(print "\n/* " fname " */")
...) The latter (using (I've sometimes wanted a Sorry about this remark coming after the merge -- I mentioned it at the fork earlier but I think it might not be so easy to find because of the force pushing may be? |
Oh sorry @sogaiu, I saw your earlier remark and changed the code accordingly; this was on "my other machine" though and I forgot to push it. |
Ah well, at least the code works :) |
As suggested by @sogaiu @zevv forget to push this change in a recent PR (janet-lang#1175 (comment)). Incidentally, the affected lines were already reformatted in the current PR, via fmt/format-file.
(Not sure if people are willing to pull in this added complexity, but giving it a shot anyway)
This change allows building Janet from the individual source files instead of from the amalgamated
janet.c
; this considerably speeds up parallel builds on modern CPUs;vs
For me this make the difference between "comfortably and quickly running my tests" and "getting slightly annoyed staring at my screen",