From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <3E42960C.2060008@nas.com> From: Jack Johnson User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.2a) Gecko/20020910 MIME-Version: 1.0 To: 9fans@cse.psu.edu References: <85bdcd8554551ec025aaeebef2e83904@mightycheese.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Subject: [9fans] Re: Clean Code & Performance Date: Thu, 6 Feb 2003 09:06:20 -0800 Topicbox-Message-UUID: 51cbd30e-eacb-11e9-9e20-41e7f4b1d025 rob pike, esq. wrote: > But to get those > 10% tweaks everybody fusses over, to the detriment of just about > everything in computing, you need to tune and tune and fuss and tweak > and hack, and that does not leave you with clean code. There's this interesting harmonic convergence in the stuff I've been reading lately, and I just thought I'd share. There's some interesting stuff going on with the Squeak VM in regards to performance, and in general people are happy with the performance improvements, but there has been a lot of discussion about what it takes to eke out another 10%, and how much of it can hurt keeping the system clean and straightforward. Because some of the Squeakers see strong similarities in Squeak/Smalltalk and Forth, there has been some discussion about rewriting the VM in Forth to get closer to the machine. Chuck Moore, Forth's creator, talks a *lot* about how he feels good Forth is nearly non-portable, because if you're really that close to the metal you're taking advantage of that particular platform's optimizations and using them to your advantage. His feeling seems to be that (in his environment) if you're knowledgeable about the problem then the coding is, relatively speaking, the easy part, that the solution is the portable part and not necessarily the code. I just find it interesting that in this third yet-unrelated thread we have this discussion of cleanliness/portability vs. performance, and how often they're at odds with each other. But, as Rob points out, there are different ways to measure performance, and something invaluable I always take away from the discussions here is how a simple solution can often be much more effective than a hard-number performance improvement. But, I'm rambling again. Nothing worse than newbies rambling. Hopefully you've taken the time to just filter me out. -Jack