user-pic

3ee5cf54-f022-4a71-8666-3c2b5ee231dd [openid.stackexchange.com]

  • Commented on Alternatives to rand()
    The only downside is the slow performance, which is typical of the AES-CTR algorithm. It shouldn't be on semi-recent hardware (which has AES support). On my not-so-recent box, openssl speed -evp chacha20 gets 1.6GB/sec with big blocks, but … -evp...
  • Commented on Golang's 'defer' in Perl
    In your make_upper_caser_iterator example, I'm pretty sure that $fh becoming unreferenced closes the file anyway. So the explicit close isn't needed (except, of course, that you could check the result and handle errors). Also, if your file handle is valid...
  • Commented on Cool Perl 6 features available in Perl 5
    You don't need Quote::Code: say "2 + 2 = @{[2 + 2]}"; # "2 + 2 = 4" That has worked in perl5 for quite a while—I think the newest feature used there is "say"....
Subscribe to feed Recent Actions from 3ee5cf54-f022-4a71-8666-3c2b5ee231dd [openid.stackexchange.com]

  • mauke commented on Cool Perl 6 features available in Perl 5

    The problems with @{[ ]} are that it looks quite clunky, it's inefficient at runtime (it builds and dereferences an arrayref), it evaluates its contents in list context, and it gets really confusing if you need (nested) quotes in the interpolated part.

  • Dana Jacobsen commented on Alternatives to rand()

    Thanks for the note. You are correct that if run on machines with AES support (which is a *lot*, and OpenSSL supports a huge number of them) and if the software supports it, then indeed it's very fast. I added a parenthetical note.

    None of the Perl modules do this. Crypt::Rijndael's AES C code is the standard reference C code. CryptX uses LibTomCrypt which is based on the original reference code. So they are not very fast (relative to other PRNGs). Fortuna also includes running SHA2, which further slows down the output. Crypt::PRNG (Fortuna) runs at 0.14 GB/s on this machine, …

  • Yuki Kimoto commented on Alternatives to rand()

    This comparison is very easy to understand.

Subscribe to feed Responses to Comments from 3ee5cf54-f022-4a71-8666-3c2b5ee231dd [openid.stackexchange.com]

About blogs.perl.org

blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is hosted by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.