Comment

Comment by zoffix222

I like concurrency in Rakudo Perl 6. (https://docs.perl6.org/language/concurrency)

Especially the .hyper method that turns a regular sequence into hyper sequence that gets processed in parallel. First 5000 prime numbers:

    # single-thread, takes 14.893s
    put ^∞ .grep(*.is-prime).head: 5000

    # multi-threaded, takes 8.853s on my 2-core box
    put ^∞ .hyper.grep(*.is-prime).head: 5000
parent zoffix222 8 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton