From f3a3bdf1e0a21059cb481c9ffd79ef7c7da2a0b7 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 14 Mar 2015 11:39:40 -0700 Subject: 906 - arc averages 800-900 cycles per second No context-switching between routines, either. --- mu.arc | 6 ++++++ trace.mu | 2 ++ 2 files changed, 8 insertions(+) diff --git a/mu.arc b/mu.arc index 72a0d86c..283f056f 100644 --- a/mu.arc +++ b/mu.arc @@ -498,6 +498,7 @@ ($:define (reset) (tput 'sgr0)) (= new-string-foo* nil) +(= last-print* 0) ; run instructions from 'routine*' for 'time-slice' (def run-for-time-slice (time-slice) @@ -512,6 +513,11 @@ (die "No results returned: @(tostring:pr (body.routine* pc.routine*))")) (++ pc.routine*)) (++ curr-cycle*) + (when (no ($.current-charterm)) + (let curr (seconds) + (when (~is curr last-print*) + (prn curr " " curr-cycle* " " len.running-routines*) + (= last-print* curr)))) ;? (trace "run" "-- " int-canon.memory*) ;? 1 ;? (trace "run" curr-cycle*) (trace "run" label.routine* " " pc.routine* ": " (body.routine* pc.routine*)) diff --git a/trace.mu b/trace.mu index b327a1d6..eba9b477 100644 --- a/trace.mu +++ b/trace.mu @@ -27,6 +27,7 @@ { begin (done?:boolean <- end-of-stream? in:stream-address) (break-if done?:boolean) +;? ($start-tracing) ;? 1 (c:character <- read-character in:stream-address) { begin (newline?:boolean <- equal c:character ((#\newline literal))) @@ -40,6 +41,7 @@ ($print (("\n" literal))) } } +;? ($quit) ;? 1 (loop) } ($print n:integer) -- cgit 1.4.1-2-gfad0