about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-02-16 12:40:25 -0800
committerKartik K. Agaram <vc@akkartik.com>2015-02-16 12:40:25 -0800
commitc2174fcffc7e2490ad25b6eb7705b53fff522e7a (patch)
treeb8981daf49992350cf3b9eeb6038c99a880d847f
parent8477a3dfee041c8df070ec1441645ebc4c60ff12 (diff)
downloadmu-c2174fcffc7e2490ad25b6eb7705b53fff522e7a.tar.gz
759 - trace.arc.t 13% faster
Something wrong with my profiling, though. Numbers aren't adding up.
-rw-r--r--mu.arc10
-rw-r--r--trace.arc.t1
2 files changed, 4 insertions, 7 deletions
diff --git a/mu.arc b/mu.arc
index df18ef0c..7f4ed6fa 100644
--- a/mu.arc
+++ b/mu.arc
@@ -252,10 +252,11 @@
   ((rep routine) 'call-stack))
 
 (def push-stack (routine op)
-  (push (obj fn-name op  pc 0  caller-arg-idx 0)
+  (push (obj fn-name op  pc 0  caller-arg-idx 0  t0 (msec))
         rep.routine!call-stack))
 
 (def pop-stack (routine)
+  (update-time top.routine!fn-name (msec))
   (pop rep.routine!call-stack))
 
 (def top (routine)
@@ -2720,12 +2721,7 @@
       (loop)
     }
     ; now back to where the cursor was
-    { begin
-      (done?:boolean <- lesser-or-equal col:integer-address/deref orig-col:integer)
-      (break-if done?:boolean)
-      (cursor-left x:terminal-address)
-      (loop)
-    }
+    (col:integer-address/deref <- copy orig-col:integer)
     (reply)
   }
   (clear-line-on-host)
diff --git a/trace.arc.t b/trace.arc.t
index b471ae86..a26093a3 100644
--- a/trace.arc.t
+++ b/trace.arc.t
@@ -538,3 +538,4 @@ schedule:  done with routine")
   (prn "F - process-key: navigation moves between top-level lines only"))
 
 (reset)
+;? (print-times) ;? 1