Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: "Rick C. Hodgin" Newsgroups: comp.compilers Subject: Re: Bit swizzling Date: Thu, 10 Sep 2020 17:13:24 -0400 Organization: Liberty Software Foundation Lines: 21 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <20-09-027@comp.compilers> References: <20-09-014@comp.compilers> <20-09-026@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="64204"; mail-complaints-to="abuse@iecc.com" Keywords: optimize Posted-Date: 10 Sep 2020 20:12:59 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com In-Reply-To: <20-09-026@comp.compilers> Content-Language: en-US Xref: csiph.com comp.compilers:2598 On 9/10/20 1:34 PM, gah4 wrote: > On Saturday, September 5, 2020 at 9:45:43 AM UTC-7, Rick C. Hodgin wrote: >> Are there any algorithms which take a known-at-compile-time sequence >> of bitwise operations on an 8-bit to 64-bit quantity, and optimize >> them down to their minimal set of operations? ... > There is a lot of work, and many algorithms, for logic optimization, > or minimization, that, for example, will find the optimal combination > of NAND and NOR gates to evaluate some logical operation. ... I have a preliminary algorithm that works, but it's still not fully optimized and is a little clunky. I want a way to abstract the logic and work with it there. I haven't put in any additional time on this algorithm yet, due to some life things happening. But I plan to come back to it. -- Rick C. Hodgin