-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
implements #25268; cache configuration evaluation #25272
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
base: devel
Are you sure you want to change the base?
Conversation
cd80eee to
29b2c99
Compare
|
Can this be enabled by default? What are the effects on compile-time and memory consumption when the cache hits? |
not without a side effect tracking mechanism - in .nims, you can fetch dynamic stuff like the latest git commit hash, read files that change, compile c libraries and so on - it's quite unsafe to cache the outcome of any such operation .. |
7a314b7 to
ad98069
Compare
|
I tested on my Raspberry Pi 5 with Raspberry Pi OS (64-bit) with simple nim code uses only default config files. rasp@rasp5:~/proj/Nim $ mkdir mytests
rasp@rasp5:~/proj/Nim $ echo 'echo "test"' > mytests/test.nim
rasp@rasp5:~/proj/Nim $ time nim c --cachecfg:off --skipUserCfg:on --skipParentCfg:on -f mytests/test.nim
0.000 evaluating config files
Hint: used config file '/home/rasp/proj/Nim/config/nim.cfg' [Conf]
Hint: used config file '/home/rasp/proj/Nim/config/config.nims' [Conf]
0.148 done evaluating config files
......................................................................
CC: system/exceptions.nim
CC: std/private/digitsutils.nim
CC: system/dollars.nim
CC: system.nim
CC: test.nim
Hint: [Link]
Hint: mm: orc; threads: on; opt: none (DEBUG BUILD, `-d:release` generates faster code)
29061 lines; 0.604s; 31.113MiB peakmem; proj: /home/rasp/proj/Nim/mytests/test.nim; out: /home/rasp/proj/Nim/mytests/test [SuccessX]
real 0m0.755s
user 0m0.854s
sys 0m0.041s
rasp@rasp5:~/proj/Nim $ time nim c --cachecfg:on --skipUserCfg:on --skipParentCfg:on mytests/test.nim
0.000 evaluating config files
Hint: used config file '/home/rasp/proj/Nim/config/nim.cfg' [Conf]
Hint: used config file '/home/rasp/proj/Nim/config/config.nims' [Conf]
0.148 done evaluating config files
......................................................................
Hint: [Link]
Hint: mm: orc; threads: on; opt: none (DEBUG BUILD, `-d:release` generates faster code)
29061 lines; 0.279s; 31.094MiB peakmem; proj: /home/rasp/proj/Nim/mytests/test.nim; out: /home/rasp/proj/Nim/mytests/test [SuccessX]
real 0m0.430s
user 0m0.399s
sys 0m0.030s
rasp@rasp5:~/proj/Nim $ time nim c --cachecfg:on --skipUserCfg:on --skipParentCfg:on mytests/test.nim
0.001 loading cached config
0.001 done loading cached config
......................................................................
Hint: [Link]
Hint: mm: orc; threads: on; opt: none (DEBUG BUILD, `-d:release` generates faster code)
18317 lines; 0.319s; 24.816MiB peakmem; proj: /home/rasp/proj/Nim/mytests/test.nim; out: /home/rasp/proj/Nim/mytests/test [SuccessX]
real 0m0.322s
user 0m0.287s
sys 0m0.035s |
No description provided.