Commit 4e882ed7 authored by Guido van Rossum's avatar Guido van Rossum

Time compilation and interpretation, too.

parent 67736dda
...@@ -92,6 +92,7 @@ import time ...@@ -92,6 +92,7 @@ import time
import getopt import getopt
from driver import parsefile, copytree, talizetree, printtree, FILE from driver import parsefile, copytree, talizetree, printtree, FILE
from driver import compiletree, interpretit
def main(): def main():
count = 10 count = 10
...@@ -109,9 +110,11 @@ def main(): ...@@ -109,9 +110,11 @@ def main():
file = FILE file = FILE
doc = timefunc(count, parsefile, file) doc = timefunc(count, parsefile, file)
doc = timefunc(count, copytree, doc) doc = timefunc(count, copytree, doc)
doc = timefunc(count, talizetree, doc) doc2 = timefunc(count, talizetree, doc)
timefunc(count, printtree, doc, open("/dev/null", "w")) timefunc(count, printtree, doc, open("/dev/null", "w"))
timefunc(count, findmacros, doc) timefunc(count, findmacros, doc)
it = timefunc(count, compiletree, doc)
timefunc(count, interpretit, it, None, open("/dev/null", "w"))
def timefunc(count, func, *args): def timefunc(count, func, *args):
sys.stderr.write("%-14s: " % func.__name__) sys.stderr.write("%-14s: " % func.__name__)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment