Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!linus!genrad!mit-eddi!mit-vax!eagle!harpo!floyd!vax135!ariel!hou5f!hou5a!hou5d!hogpc!houxm!ihnp4!ixn5c!inuxc!pur-ee!uiucdcs!emrath From: emrath@uiucdcs.UUCP Newsgroups: net.unix-wizards Subject: Re: Some questions about the C -Optimise - (nf) Message-ID: <2247@uiucdcs.UUCP> Date: Thu, 16-Jun-83 04:32:05 EDT Article-I.D.: uiucdcs.2247 Posted: Thu Jun 16 04:32:05 1983 Date-Received: Fri, 17-Jun-83 05:40:06 EDT Lines: 21 #R:edai:-208300:uiucdcs:13700036:000:829 uiucdcs!emrath Jun 16 02:40:00 1983 I have a thought about the second optimzation question, in the case of the instruction t = s & 0xffffff; /* s and t are int's */ I have noticed that the optimzer does a fair job at reducing the size of the code generated. It seems to strive for this, possibly under the assumption that shorter code might be expected to execute faster (in general, this seems like a good rule of thumb). In this case, the optimzer generates: extzv $position,$size,source,destination rather than: bicl3 $mask,source,destination The mask requires 5 bytes of code (in general), while the position and size are small integer constants and only require 2 bytes. Maybe this was the reason that extzv was used instead of the bicl3, that the implementor(s) didn't have time to run speed tests on every possible optimization. I'm just guessing.