# results-tkbench.txt for M1 Mac Mini MacOS 11.2.3 # This is an edited transcript of action in a VScode terminal window # from which Thomas Wamm ran tk benchmarks from E. Paine (epaine). # first run with system python2.7 (for arm64 Apple silicon): ptr@Peters-Mac-mini ~ % /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /Users/ptr/python-debugging/tkbench/bench.py DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning. Test clearing (298.25615882873535, 'microseconds per iteration') Test not clearing (7912.631988525391, 'microseconds per iteration') # amazingly fast !! # second run with system python2.7: ptr@Peters-Mac-mini ~ % /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python /Users/ptr/python-debugging/tkbench/bench.py DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning. Test clearing (289.23702239990234, 'microseconds per iteration') Test not clearing (7957.850933074951, 'microseconds per iteration') # still fast. # While tkbench.py ran with python2.7, the tk window showed up okay, but there was no Python menu bar as occurs when running with a python3. ptr@Peters-Mac-mini ~ % /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 /Users/ptr/python-debugging/tkbench/bench.py Test clearing 602.461667 microseconds per iteration Test not clearing 10127.303625 microseconds per iteration ptr@Peters-Mac-mini ~ % ptr@Peters-Mac-mini ~ % /Library/Frameworks/Python.framework/Versions/3.8/bin/python3 /Users/ptr/python-debugging/tkbench/bench.py Test clearing 715.811875 microseconds per iteration Test not clearing 10153.489624999998 microseconds per iteration # this was Python3.8.7 Intel code running under Rosetta2. # python3.8.7 Intel is slower than python2.7 Apple arm64 # About Python menu showed "Tcl 8.6 & Tk 8.6 (8.6.8)" ptr@Peters-Mac-mini ~ % /Library/Frameworks/Python.framework/Versions/3.9/bin/python3 /Users/ptr/python-debugging/tkbench/bench.py Test clearing 715.6254170000001 microseconds per iteration Test not clearing 10214.945 microseconds per iteration # this is Python3.9.2 Intel code running under Rosetta2. # About Python menu again showed "Tcl 8.6 & Tk 8.6 (8.6.8)" ptr@Peters-Mac-mini ~ % /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 /Users/ptr/python-debugging/tkbench/bench.py Test clearing 33336.9212920079 microseconds per iteration Test not clearing 33349.058708001394 microseconds per iteration # these results are slower than my ancient iMac24-2007 !!! # About Python menu item only shows "Version 3.10.0a6 (3.10.0a6)", # no Tcl/Tk version info was accessible (but it was presumably 8.6.11) ptr@Peters-Mac-mini ~ % /Library/Frameworks/Python.framework/Versions/3.10/bin/python3 /Users/ptr/python-debugging/tkbench/bench.py 2> ~/tkbench-py310-stderr.log Test clearing 33331.81541599333 microseconds per iteration Test not clearing 33349.143041006755 microseconds per iteration ptr@Peters-Mac-mini ~ % ls -l ~/tkbench-py310-stderr.log -rw-r--r--@ 1 ptr staff 0 Mar 24 03:21 /Users/ptr/tkbench-py310-stderr.log ptr@Peters-Mac-mini ~ % cat ~/tkbench-py310-stderr.log ptr@Peters-Mac-mini ~ % # nothing there; zero bytes from stderr #====================================================================================== # Now using a MacOS Terminal window to try bench.tcl with system-supplied Tcl/Tk 8.5.9: ptr@Peters-Mac-mini ~ % ps PID TTY TIME CMD 11451 ttys000 0:00.02 /bin/zsh -l 11511 ttys001 0:00.05 -zsh ptr@Peters-Mac-mini ~ % wish DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning. % ps PID TTY TIME CMD 11451 ttys000 0:00.02 /bin/zsh -l 11511 ttys001 0:00.05 -zsh 11531 ttys001 0:00.01 /bin/sh /usr/bin/wish 11533 ttys001 0:00.09 /usr/bin/../../System/Library/Frameworks/Tk.framework/Versions/8.5/Resourc % pwd /Users/ptr % cd python-debugging/tkbench % ls bench.py bench.tcl % pwd /Users/ptr/python-debugging/tkbench % info patchlevel 8.5.9 % ./bench.tcl invalid command name "./bench.tcl" # I don't yet know how to run scripts from inside tclsh or wish % % ptr@Peters-Mac-mini ~ % pwd /Users/ptr ptr@Peters-Mac-mini ~ % cd python-debugging/tkbench ptr@Peters-Mac-mini tkbench % ls bench.py bench.tcl ptr@Peters-Mac-mini tkbench % wish bench.tcl DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning. Test clearing 285.005125 microseconds per iteration Test not clearing 7941.7769579999995 microseconds per iteration ptr@Peters-Mac-mini tkbench % wish bench.tcl DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning. Test clearing 281.251875 microseconds per iteration Test not clearing 7863.973416 microseconds per iteration ptr@Peters-Mac-mini tkbench % wish bench.tcl DEPRECATION WARNING: The system version of Tk is deprecated and may be removed in a future release. Please don't rely on it. Set TK_SILENCE_DEPRECATION=1 to suppress this warning. Test clearing 269.86854100000005 microseconds per iteration Test not clearing 7845.548707999999 microseconds per iteration ptr@Peters-Mac-mini tkbench % # these timings are good, similar to python2.7 bench.py (Apple silicon arm64) # I have not yet tried to install a newer version of Tcl/Tk. Maybe later.