in reply to Count byte/character occurrence (quickly)

Perl offers autovivivication and magic auto-increment. You don't need the if at all:

$seen{$_}++ for split // => $buf;

Enjoy, Have FUN! H.Merijn

Replies are listed 'Best First'.
Re^2: Count byte/character occurrence (quickly)
by james28909 (Deacon) on Apr 01, 2016 at 08:33 UTC
    This is very good to know, thanks. It doesnt however speed up the script, which is what I am ultimately after. I have been looking at multi-threading, but I am lost on that subject and unsure if I would see that much of a speed up.