From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.5.5 with SMTP id 5mr5351795qat.4.1380724995987; Wed, 02 Oct 2013 07:43:15 -0700 (PDT) X-Received: by 10.50.98.4 with SMTP id ee4mr123902igb.5.1380724995892; Wed, 02 Oct 2013 07:43:15 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!a6no952698qak.0!news-out.google.com!9ni3043qaf.0!nntp.google.com!q9no1244428qas.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 2 Oct 2013 07:43:15 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=2607:fe50:0:8514:f66d:4ff:fed0:32ee; posting-account=2ZF-4AoAAACjyRiHABaMHHY6KlpUj2jN NNTP-Posting-Host: 2607:fe50:0:8514:f66d:4ff:fed0:32ee References: <8aca502c-bba8-4af5-9192-459c15fe048b@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Optimizing Ada From: kennethesills@gmail.com Injection-Date: Wed, 02 Oct 2013 14:43:15 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: news.eternal-september.org comp.lang.ada:17378 Date: 2013-10-02T07:43:15-07:00 List-Id: > I wonder whether your performance problem is caused by using a function? > The internal Word_Map is, I think, going to be copied to the destination > and then finalized. Could you use an out parameter? (remembering to > clear it before adding ne new content). That was exactly it, actually. As per Jacob's suggestion - I used an extended return and it dropped down to 2900ns. Another suggestion was that Rust uses a faster hash function (SipHash 2-4).