Path: utzoo!attcan!uunet!lll-winken!ames!amdahl!amdcad!crackle!tim From: tim@crackle.amd.com (Tim Olson) Newsgroups: comp.lang.misc Subject: Re: Clever programming tricks wanted Message-ID: <24033@amdcad.AMD.COM> Date: 12 Jan 89 21:34:15 GMT References: <4061@hubcap.UUCP> <47380@yale-celray.yale.UUCP> Sender: news@amdcad.AMD.COM Reply-To: tim@crackle.amd.com (Tim Olson) Organization: Advanced Micro Devices, Inc. Sunnyvale CA Lines: 22 Summary: Expires: Sender: Followup-To: In article <47380@yale-celray.yale.UUCP> wald-david@CS.YALE.EDU (david wald) writes: | In article <4061@hubcap.UUCP> mcvax!etive.ed.ac.uk!gvw@uunet.UU.NET (MOBY) writes: | >I'm looking for "clever" programming tricks. | | A year or so ago someone showed me a paper in which the author described | a semi-automated hack generator (my phrasing, not the author's). | | Some of the code generated by this thing was extremely non-intuitive, | even when it was correct, making use of obscure flag settings and such, | and certainly qualified for the "hack" title. A lot of the trickiness was using the carry bit in strange ways. | Does any one recognize this work? I'll try to dig up the reference. "Superoptimizer: A look at the Smallest Program", H. Massalin, ASPLOS II Proceedings. -- Tim Olson Advanced Micro Devices (tim@crackle.amd.com)