in reply to Re^5: unpacking 6-bit values
in thread unpacking 6-bit values

That's a neat optimisation, but it gets its gains by pushing some of the required processing out of the benchmark.

What I mean by that is that the sets of 32 numbers are manipulated in pairs (of sets).

So, using uicb() I would have to expand one set to the buffer; copy them somewhere else; then expand the second set; before I could then do the manipulations. Ie, the copying would still need to be done, but it is no longer being measured.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

Replies are listed 'Best First'.
Re^7: unpacking 6-bit values
by Tux (Canon) on Dec 12, 2010 at 20:46 UTC

    My goal here was just to check the influence of pre-bound variables, a-la bind_columns () in DBI and Text::CSV_XS. It wouldn't be too hard to rewrite the init routine to pass it any for of references and make uicb () (Unpack Inline C Bind), store the results in exactly the variables you want and thus bypass all the unwanted copying and the mortalizing cost.

    The fact that you are dealing with a very limited range makes this very feasible.


    Enjoy, Have FUN! H.Merijn