From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=0.8 required=3.0 tests=BAYES_50,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.5-pre1 X-Received: by 2002:aed:2e65:: with SMTP id j92mr23223111qtd.333.1607338506550; Mon, 07 Dec 2020 02:55:06 -0800 (PST) X-Received: by 2002:a05:620a:347:: with SMTP id t7mr23717546qkm.164.1607338506369; Mon, 07 Dec 2020 02:55:06 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!aioe.org!peer01.ams4!peer.am4.highwinds-media.com!peer03.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Mon, 7 Dec 2020 02:55:06 -0800 (PST) In-Reply-To: <5b8e43c3-ed39-4a44-8aa6-bc00d43be624n@googlegroups.com> Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2a03:7380:380d:3b:792b:614:c6d5:d3f6; posting-account=K1cP1QoAAAD_GR6kW2Td0NqGqGBLRE8h NNTP-Posting-Host: 2a03:7380:380d:3b:792b:614:c6d5:d3f6 References: <3daf539f-d0d9-431d-92ff-8210fd520793n@googlegroups.com> <5b8e43c3-ed39-4a44-8aa6-bc00d43be624n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <10a26bc3-9f76-4857-be6d-ec00fccbdbc9n@googlegroups.com> Subject: Re: Advent of Code Day 6 From: Maxim Reznik Injection-Date: Mon, 07 Dec 2020 10:55:06 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 1618 X-Received-Body-CRC: 16016499 Xref: reader02.eternal-september.org comp.lang.ada:60755 List-Id: In my solution I use a custom type - a boolean flag for each character. It takes 26 bytes (or even bits if you add `with Pack` aspect) and should be quite fast. Having this type it's easy to do `and` and `or` between such maps: https://github.com/reznikmm/ada-howto/blob/advent-2020/md/06/06.md -- Max