(no subject)

Date: 2009-12-20 04:49 pm (UTC)
vatine: Generated with some CL code and a hand-designed blackletter font (Default)
From: [personal profile] vatine
Lua is (almost) Greenspun by design. Although Greenspunning C takes a bit of effort.

(no subject)

Date: 2009-12-20 05:13 pm (UTC)
From: [identity profile] maradydd.livejournal.com
Postgres actually did a halfway decent job of it, though some of their list-walking functions work backward.

(no subject)

Date: 2009-12-20 05:38 pm (UTC)
vatine: Generated with some CL code and a hand-designed blackletter font (Default)
From: [personal profile] vatine
If you've ever looked at the VAX instruction set, you'll possibly be surprised to see an essentially-Greenspun microcoded CPU (there's definitely list-walking instructions in there and all sorts of BIZARRE things).

One of the few CPUs I know of where "optimize for lowest instruction count" tends towards generating slower and larger code than either "optimize for smallest code size" or "optimize for fastest execution" (also the inly CPU I know of to have had a "optimize for instruction count" compiler, but taht may be by-the-by).

(no subject)

Date: 2009-12-20 09:02 pm (UTC)
From: [identity profile] joedecker.livejournal.com
If you've ever looked at the VAX instruction set,...

...and lived to tell the tale....

Yeah. The polynomial evaluation instruction on early Vaxen was slower and larger than DIY evaluation, as I recall. (This may have been microcode version and/or VAX model dependent). It made me laugh many a time.

( But then, I actually liked the nasty complexity of early DCL quoting, so,... )

(no subject)

Date: 2009-12-20 09:46 pm (UTC)
From: [identity profile] lightning-rose.livejournal.com

For a long time I thought the early RISC proponents just had a sour grapes attitude because they weren't smart enough to write a compiler that could make use of the VAX instruction set. :)

(no subject)

Date: 2009-12-20 09:59 pm (UTC)
From: [identity profile] lightning-rose.livejournal.com

"optimize for instruction count" makes sense in a universe where a megabyte is a huge (and hugely expensive) amount of RAM. Especially on a machine with virtual memory* and poor page swapping algorithms. A program that exceeded it's available RAM by even a few bytes could take a horrible hit in performance due to disk swapping. A less than speed optimal program may well outperform a speed optimized program if stays resident in RAM.


*) Virtual memory in it's original sense, not today's definition which is mostly just memory management.

(no subject)

Date: 2009-12-22 01:08 am (UTC)
From: [identity profile] mentalguy.livejournal.com
These days, replace "RAM" with "instruction cache". Cache misses really hurt.

(no subject)

Date: 2009-12-27 05:30 pm (UTC)
From: [identity profile] lightning-rose.livejournal.com

Indeed. I have disabled cache on pc's just to see how much the performance drops. Tip: don't do this with an o/s that boots into a gui.

I've also done a fair amount of embedded kernel development so I've benchmarked the differences between cache on and cache off at boot time.

(no subject)

Date: 2009-12-22 07:54 pm (UTC)
From: [identity profile] kragen.livejournal.com
"optimize for smallest code size" makes more sense in that context, and the comment you're replying to asserts that "optimize for instruction count" tended to produce bigger code than "optimize for smallest code size", which is unsurprising. (The surprising part is that "optimize for smallest code size" existed.)

(no subject)

Date: 2009-12-27 05:39 pm (UTC)
From: [identity profile] lightning-rose.livejournal.com

You're right, I mis-read the comment. my above comment should have been in regards to "optimize for smallest code size".

(no subject)

Date: 2009-12-29 11:30 am (UTC)
vatine: Generated with some CL code and a hand-designed blackletter font (Default)
From: [personal profile] vatine
It would've made sense, if it wasn't for the fact that the really powerful instructions (as in "did lots of stuff") usually ended up being MASSIVELY huge, memory-wise. We're talking machine instructions in the multiple tens of bytes, here.

Profile

maradydd: (Default)
maradydd

September 2010

S M T W T F S
   1234
567891011
12131415 161718
19202122232425
26 27282930  

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags