user-pic

Reini Urban

  • Website: rurban.xarch.at/
  • About: Working at cPanel on B::C (the perl-compiler), p2, types, parrot, B::Generate, cygwin perl and more guts (LLVM, jit, optimizations).
  • Posted Perfect Hashes and faster than memcmp to Reini Urban

    In my previous post about perlcc next steps Perfect::Hash.

    # generate c file for readonly lookup
    phash keyfile --prefix=phash -nu…
  • Commented on Type::Tiny Tricks #2: Types Are Objects
    Note that this is only true for Moose types. perl types are just classes (i.e. packages), not objects. Having them as objects is purely optional, but they need to be defined as class mandatory....
  • Posted perlcc next steps to Reini Urban

    cPanel uses now the new perl compiler B::C with -O3 and --staticxs

    Our old compiler (with 5.6.2) needed 2:30 hours for each build, produced ~100 binaries of about 30-50MB size. This sounds a lot but it is not. This is about the …

  • Commented on vec is slow, little-endian and limited
    Dana, yes. I've got minor problems with Bit::Vector being not optimized enough for the simple word-aligned cases I was using, even if the API supports words. And I've got bigger problems with vec being little-endian only (on intel), being too...
  • Commented on vec is slow, little-endian and limited
    See https://github.com/rurban/Perfect-Hash/blob/master/Hash.xs#L156 for the fast and pureperl/XS compatible version I'm now using. nvecget and nvecset, n for natural, not network-order. So big-endian on big-endian machines, and little-endian on intel. I didn't cover the bits smaller than 4 yet, as I'm...
  • Posted vec is slow, little-endian and limited to Reini Urban

    I remembered from the perl docs to use vec to compress arrays of size advantage is 3320 byte vs 88 bytes for two integer arrays of size 20 with values [0..1…

  • Commented on playing with Cairo
    Using B::CC with types or rperl would be next level, but Inline::C should be good enough for the beginning....
  • Commented on playing with Cairo
    Just rewrite to most expensive ones, like rotate, walk, cast, inside, update in Inline::C. Still readable, in the same file. No need to use perl ops for the float ops....
  • Commented on Google Summer of Code 2014 (Update 2)
    My backup mentor is Bruce Gray (Util)...
  • Commented on Statistics for perl hash tables
    mst: It is a sad thing to tell that, and it would have been better to avoid these allegations, but other people need to work with perl5 also, so they need to be told how the state of the onion...
  • Commented on Statistics for perl hash tables
    Aristotle: That is my theory also. The implementation is just bad (that's what I see) and the decisions were not rational. The contradicting theory (in p5p's favor) would have been that they found something to keep the current collision scheme...
  • Commented on Statistics for perl hash tables
    yves: This was bulk's idea not mine. If the hash numbers are the same in an array of collisions, sorting by it would be wrong. But this quickly got below my level of interaction, sorry....
  • Commented on Statistics for perl hash tables
    bulk88: we hash unnecessary bits. needed are typically the last 5-9 bits (size 32-512) The biggest hash table in the core test suite needs 15 bits! Maybe I dont get something here, but CPUs can only do natively 32/8 bit...
  • Commented on Statistics for perl hash tables
    Steffen: Ok, sounds fair not to publish the attack itself. I'm working on testing my ideas currently. The typical case should be fast and the abnormal attack costs should not be linear. So far with our linear collision scheme I...
  • Commented on Statistics for perl hash tables
    Steffen, you are right. I see we are using ONE_AT_A_TIME_HARD in blead now. That's what the statistics is against. Obviously I was only reading Yves blog post and didn't follow the many changes of the now default function. JenkinsOOAT =>...
  • Posted Statistics for perl hash tables to Reini Urban

    The following data is from a 64bit perl-5.19.10 (i.e. 32 bit jenkins - corrected from 64 bit siphash - which randomly shuffles the 2 first entries of collisions), running the core test suite with -DH.

    number of hash keys:

    0   3634661x
    1   326…
  • Posted Do not use each to Reini Urban

    The each hash iterator has two problems which almost nobody is aware We were using the perl-compiler since 12 years in production and just recently found out that the B function ="pretty…

  • Posted My new buildbot to Reini Urban

    I've added some buildbot instances on various architectures to my new buildbot at http://perl514.cpanel.net/build/.

    Tested projects are so far: perl5, rakudo, nqp, parrot and p2.

    The buildslaves are c…

  • Commented on Subroutine attributes: where and how to use them
    I've added this to the Google+ post of the video: I'm missing the important distinction and dangers of Attribute::Handlers vs Sub::Attributes. Attribute::Handlers evaluates all code attribute arguments, Sub::Attributes not. sub cleanup :Help(unlink some files) {} Will not only attach the...
  • Commented on C::TinyCompiler, a just-in-time C compiler for Perl
    BTW: perlcc is used by cPanel in production for about 15 years, and is very stable. Not all perl5 features are supported, but all which are needed for modern perl and 99% of CPAN...
  • Posted B::C[C] and rperl to Reini Urban

    With rperl we have now a second serious perl B::CC, but also several disadvantages.

    Basically we need to define compilation blocks for rperl (restricted perl) - typed and compile-time optimizab…

  • Commented on Moving PPI to GitHub encourages some new activity
    Great!...
  • Posted How to resize a NTFS qemu qcow2 image (the easy way) to Reini Urban

    There's so much bad information out there how to simply resize a NTFS qemu qcow2 (windows in kvm) image, and I need to frequently enhance my windows images, esp. on win8 (64 bit) so I'll document it here for the next time:

    • Don't use fdisk if you have gparted!
    • Don't waste spa…
  • Commented on A Tiny Code Quiz
    The relevant Concise is: s <@> print vK ->t l <0> pushmark s ->m - <1> scalar sK/1 ->s r <@> list sK ->s m <0> pushmark v ->n o <1> rv2av[t5] vK/1 ->p n gv(ar1) s ->o q <1>...
  • Commented on How I fixed a crazy test problem: make -j4
    I finally fixed all make problems by removing most of shell-code from the make rules, e.g. by using special shell-scripts, and by passing + to such external scripts which call make by themselves, to tell the job-server the pid of...
  • Commented on I want mop rest capability to define fast accessor
    See http://blogs.perl.org/users/rurban/2011/06/how-perl-calls-subs-and-methods.html on "Optimization of static methods, e.g. Class->new" the opt_methods patch. With typed methods, readonly packages and @ISA you'll get this optimization also for dynamic methods. In Moose/mop they called it immutable, but don't use these optimizations....
  • Commented on How I fixed a crazy test problem: make -j4
    Having even more crazy make issues, fixed by using gmake-4.0. https://github.com/perl11/potion/issues/53...
  • Posted How I fixed a crazy test problem: make -j4 to Reini Urban

    For quite some months I was running after crazy potion and p2 testing problems, which looked like compiler or stack alignment problems.

    potion, the vm for p2 uses tricky volatile words to force the…

  • Commented on C::TinyCompiler, a just-in-time C compiler for Perl
    Looks nice and clean. So the remaining sugar is needed as for every other FFI like package: Handle foreign and perl primitive and aggregate data structures more easily (where ctypes got stuck). Apparently I have to lookup PDL, which seems...
  • Commented on CPAN modules for defining constants
    BTW: https://github.com/rurban/perl/tree/typed/const was my start for a real native const/readonly attribute for lexical variables, but without the following compiler optimizations for perfect hashes, better arrays, methods, classes, inheritance, ......
Subscribe to feed Recent Actions from Reini Urban

  • Dmitry Karasik commented on playing with Cairo

    Raini thanks for the tip .. Indeed Inline::C speeds it up to 10 times! Now in 1.01 version :)

  • Dana Jacobsen commented on vec is slow, little-endian and limited

    When making my Data::BitStream and Data::BitStream::XS modules I did a bunch of vec() manipulation, including versions using Bit::Vector, strings, and my own XS.

    In many cases what I found was that often just using string storage was faster than Bit::Vector, merely because Perl optimizes the heck out of things like substr. Once the vector grows large (e.g. for Unary codes) then Bit::Vector is better. Using 32-bit vectors with bit twiddling in Perl was pretty close to Bit::Vector's speed for my operations. Of course it will differ based on your operations.

    Using an XS back …

  • Paul "LeoNerd" Evans commented on vec is slow, little-endian and limited

    I've never actually found a use-case for vec() to do anything other than maintaining the bitvectors for a select() system call.

  • Olivier Duclos commented on vec is slow, little-endian and limited

    Nice finding! But since you have already done all this work, why not fixing vec in core instead of making a module?

  • Toby Inkster commented on Type::Tiny Tricks #2: Types Are Objects

    This blog post is about Type::Tiny type constraint objects. In the Type::Tiny framework all types (Int, Str, ArrayRef, FileHandle, etc) are represented by objects. (Though that's not to say that values are.)

Subscribe to feed Responses to Comments from Reini Urban

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 run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.