I defined the 'PROC rat_gcd' in global space but with Algol 68 it
could also be defined locally (to not pollute the global namespace)
like
[... snip ...]
though performance measurements showed some noticeable degradation
with a local function definition as depicted.
I'd prefer it to be local but since it's ubiquitously used in that
library the performance degradation (about 15% on avg) annoys me.
Opinions on that?
On 18/08/2025 03:52, Janis Papanagnou wrote:
I defined the 'PROC rat_gcd' in global space but with Algol 68 it
could also be defined locally (to not pollute the global namespace)
like
[... snip ...]
though performance measurements showed some noticeable degradation
with a local function definition as depicted.
I can't /quite/ reproduce your problem. If I run just the
interpreter ["a68g myprog.a68g"] then on my machine the timings are identical. If I optimise ["a68g -O3 myprog.a68g"], then /first time/ through, I get a noticeable degradation [about 10% on my machine],
but the timings converge if I run them repeatedly. YMMV.
I suspect
it's to do with storage management, and later runs are able to re-use
heap storage that had to be grabbed first time.
But that could be
completely up the pole. Marcel would probably know.
If you see the same, then I suggest you don't run programs
for a first time. [:-)]
I'd prefer it to be local but since it's ubiquitously used in that
library the performance degradation (about 15% on avg) annoys me.
Opinions on that?
Personally, I'd always go for the version that looks nicer
[ie, in keeping with your own inclinations, with the spirit of A68,
with the One True (A68) indentation policy, and so on].
If you're
worried about 15%, that will be more than compensated for by your
next computer!
If you're Really Worried about 15%, then I fear it's
back to C [or whatever]; but that will cost you more than 15% in
development time.
Actually, with more tests, the variance got even greater; from 10%
to 45% degradation. The variances, though, did not converge [in my environment].
I also suspected some storage management effect; maybe that the GC
got active at various stages. (But the code did not use anything
that would require GC; to be honest, I'm puzzled.)
If you'reActually I'm very conservative concerning computers; mine is 15+
worried about 15%, that will be more than compensated for by your
next computer!
years old, and although I "recently" thought about getting an update
here it's not my priority. ;-)
[...]
If you'reActually I'm very conservative concerning computers; mine is 15+
worried about 15%, that will be more than compensated for by your
next computer!
years old, and although I "recently" thought about getting an update
here it's not my priority. ;-)
Ah. I thought I was bad, keeping computers 10 years or so!
I got a new one a couple of years back, and the difference in speed
and storage was just ridiculous.
[...] (That's actually one point that annoys me in "modern"
software development; rarely anyone seems to care economizing resource requirements.) [...]
And, by the way, thanks for your suggestions and helpful information
on my questions in all my recent Algol posts! It's also very pleasant
being able to substantially exchange ideas on this (IMO) interesting
legacy topic.
From time to time I wonder what would happen if we ran
7th Edition Unix on a modern computer.
From time to time I wonder what would happen if we ranThe Linux kernel source is currently over 40 million lines, and I
7th Edition Unix on a modern computer.
understand the vast majority of that is device drivers.
If you were to run an old OS on new hardware, that would need drivers for that new hardware, too.
On 20/08/2025 01:43, Lawrence D’Oliveiro wrote:
If you were to run an old OS on new hardware, that would need
drivers for that new hardware, too.
Yes, but what is so special about a modern disc drive, monitor,
keyboard, mouse, ... that it needs "the vast majority" of 40M lines
more than its equivalent for a PDP-11?
[...] (That's actually one point that annoys me in "modern"
software development; rarely anyone seems to care economizing resource requirements.) [...]
On 20/08/2025 01:43, Lawrence D’Oliveiro wrote:
The Linux kernel source is currently over 40 million lines, and I
understand the vast majority of that is device drivers.
You seem to be making Janis's point, but that doesn't seem to
be your intention?
If you were to run an old OS on new hardware, that would need drivers for
that new hardware, too.
Yes, but what is so special about a modern disc drive, monitor,
keyboard, mouse, ... that it needs "the vast majority" of 40M lines more
than its equivalent for a PDP-11? [...]
On Wed, 20 Aug 2025 23:58:58 +0100, Andy Walker wrote:
On 20/08/2025 01:43, Lawrence D’Oliveiro wrote:Keyboard and mouse -- USB. [...]
If you were to run an old OS on new hardware, that would needYes, but what is so special about a modern disc drive, monitor,
drivers for that new hardware, too.
keyboard, mouse, ... that it needs "the vast majority" of 40M lines
more than its equivalent for a PDP-11?
On 21/08/2025 03:59, Lawrence D’Oliveiro wrote:
[...]
You've given us a list of 20-odd features of modern systems
that have been developed since 7th Edition Unix, and could no doubt
think of another 20. What you didn't attempt was to explain why all
these nice things need to occupy 40M lines of code. That's, give or
take, 600k pages of code, call it 2000 books. That's, on your figures,
just the kernel source; [...]
What you didn't attempt was to explain why all these nice things
need to occupy 40M lines of code.
Sysop: | DaiTengu |
---|---|
Location: | Appleton, WI |
Users: | 1,064 |
Nodes: | 10 (0 / 10) |
Uptime: | 148:04:21 |
Calls: | 13,691 |
Calls today: | 1 |
Files: | 186,936 |
D/L today: |
33 files (6,120K bytes) |
Messages: | 2,410,932 |