miriam_e: from my drawing MoonGirl (Default)
[personal profile] miriam_e
More surprises. I rewrote the python program to do the same thing as my awk program. It writes to a pbm image file instead of to the screen. My unoptimised awk program took less time than my new python program, which was also unoptimised.

0.123 seconds - awk
0.139 seconds - python writing to a file
12 minutes 39.687 seconds - python writing to the screen

So my earlier python program was spending almost all its time in the graphics routines.

I wonder if it's possible to find a simpler, faster way to write to a screen. One of the things old computers did really well was writing directly to the screen. Unfortunately, extra capabilities of modern computers require extra calculations that slow everything down -- being able to write to an arbitrarily sized and positioned window, for example. If you have extra layers of a language to interpret graphical commands this further slows everything.

Profile

miriam_e: from my drawing MoonGirl (Default)
miriam_e

March 2026

S M T W T F S
12 34567
89 1011 121314
15161718192021
22232425262728
293031    

Style Credit

Expand Cut Tags

No cut tags
Page generated Friday, 20 March 2026 07:39 am
Powered by Dreamwidth Studios