gc tweaking to gain a few percent of performance
This commit is contained in:
parent
7d2b3dd6db
commit
73c3551766
13 changed files with 183 additions and 153 deletions
|
|
@ -50,7 +50,7 @@ proc ProcessCmdLine(pass: TCmdLinePass, command, filename: var string) =
|
|||
rawMessage(errArgsNeedRunOption, [])
|
||||
|
||||
proc HandleCmdLine() =
|
||||
var start = getTime()
|
||||
var start = epochTime()
|
||||
if paramCount() == 0:
|
||||
writeCommandLineUsage()
|
||||
else:
|
||||
|
|
@ -73,7 +73,8 @@ proc HandleCmdLine() =
|
|||
if gCmd == cmdRun:
|
||||
tccgen.run()
|
||||
if gCmd notin {cmdInterpret, cmdRun}:
|
||||
rawMessage(hintSuccessX, [$gLinesCompiled, $(getTime() - start)])
|
||||
rawMessage(hintSuccessX, [$gLinesCompiled,
|
||||
formatFloat(epochTime() - start, ffDecimal, 3)])
|
||||
if optRun in gGlobalOptions:
|
||||
when defined(unix):
|
||||
var prog = "./" & quoteIfContainsWhite(changeFileExt(filename, ""))
|
||||
|
|
@ -81,6 +82,7 @@ proc HandleCmdLine() =
|
|||
var prog = quoteIfContainsWhite(changeFileExt(filename, ""))
|
||||
execExternalProgram(prog & ' ' & arguments)
|
||||
|
||||
#GC_disableMarkAndSweep()
|
||||
cmdLineInfo = newLineInfo("command line", -1, -1)
|
||||
condsyms.InitDefines()
|
||||
HandleCmdLine()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue