From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom Date: Fri, 4 Feb 2011 09:38:12 -0500 To: 9fans@9fans.net Message-ID: In-Reply-To: <20110204071605.E2F955B92@mail.bitblocks.com> References: <2c752317a96b7b8b980ad37e92ff6f01@terzarima.net> <20110203021608.006575B67@mail.bitblocks.com> <2c48b8397b29ededd862efa6de0baf70@brasstown.quanstro.net> <20110203174129.C984D5B91@mail.bitblocks.com> <20110203183304.648355B91@mail.bitblocks.com> <05360a88f7a0cd797278d6bd6a3ae73f@ladd.quanstro.net> <20110203194058.8F4B55B91@mail.bitblocks.com> <7c9185b80ba40fd32ba3aa75bdcc8fcf@ladd.quanstro.net> <20110204071605.E2F955B92@mail.bitblocks.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] Modern development language for Plan 9, WAS: Re: RESOLVED: recoving important header file rudely Topicbox-Message-UUID: ac7687a8-ead6-11e9-9d60-3106f5b1d025 > > > Or something equivalent. Example: How do you know moving an > > > expression out of a for loop is valid? The optimizer needs to > > > understand the control flow. > > > > is this still a useful thing to be doing? > > Yes. what's your argument? my argument is that the cpu is so fast relative to the network and disk, that wasting a few cycles is a good tradeoff for compiler and debugging simplicity, and compile speed. further, i'm not sure the compiler is in a position to know when strength reduction will make sense. intel, for example, does a lot of optimization that is "not architectural". that's code that means they won't tell you what will be a net win. i can think of a number of things that might defeat moving code out of a loop, such as the computation using otherwise idle functional units, keeping the value in the trace cache, keeping the value out of l2, the loop detector, etc. - erik