aboutsummaryrefslogtreecommitdiff
path: root/src/main/stanza/compilers.stanza
diff options
context:
space:
mode:
authorAdam Izraelevitz2015-07-21 11:40:19 -0700
committerAdam Izraelevitz2015-07-21 11:40:19 -0700
commitc69a45738f40e234ffb82db0f6030f7d185dc305 (patch)
treef167aebc85b4febcce2cc6e5988de60073b23c05 /src/main/stanza/compilers.stanza
parent70567d4d57ac178660fbef0ef660069b52857562 (diff)
Made things go faster. Still in progress. Expand when now removes
non-referenced declarations that are not instances, but it doesn't work right now.
Diffstat (limited to 'src/main/stanza/compilers.stanza')
-rw-r--r--src/main/stanza/compilers.stanza23
1 files changed, 16 insertions, 7 deletions
diff --git a/src/main/stanza/compilers.stanza b/src/main/stanza/compilers.stanza
index db6781c5..64d4a7c4 100644
--- a/src/main/stanza/compilers.stanza
+++ b/src/main/stanza/compilers.stanza
@@ -77,16 +77,25 @@ public defn run-passes (c:Circuit,ls:List<Pass>) :
println("Compiling!")
if PRINT-CIRCUITS : println("Original Circuit")
if PRINT-CIRCUITS : print(c)
- val start-time = current-time-us()
+ ;val start-time = current-time-us()
+ val start-time = to-int(to-string(current-time-us() / to-long(1000)))
var t = start-time
- val tables = Vector<HashTable<Symbol,HashTable<Symbol,Symbol>>>()
+ val time-table = Vector<[String,Int]>()
for p in ls do :
+ println-all(STANDARD-ERROR,["Starting " name(p)])
if PRINT-CIRCUITS : println(name(p))
c* = pass(p)(c*)
if PRINT-CIRCUITS : print(c*)
- val current-time = current-time-us()
- println-all(["Finished " name(p) "\n"])
- println-all(["Time since start: " current-time - start-time])
- println-all(["Time for this pass: " current-time - t])
+ val current-time = to-int(to-string(current-time-us() / to-long(1000)))
+ println-all(STANDARD-ERROR,["Finished " name(p)])
+ println-all(STANDARD-ERROR,["Milliseconds since start: " current-time - start-time])
+ println-all(STANDARD-ERROR,["Milliseconds for this pass: " current-time - t])
+ println-all(STANDARD-ERROR,["\n"])
+ add(time-table,[name(p), current-time - t])
t = current-time
- println("Done!")
+
+ println(STANDARD-ERROR,"===== Time Breakdown =====")
+ for x in time-table do :
+ println-all(STANDARD-ERROR,[x[0] " --- " to-float(x[1] as Int) / to-float(t - start-time) "%"])
+ println(STANDARD-ERROR,"==========================")
+ println(STANDARD-ERROR,"Done!")