in reply to Re: Bit vector fiddling with Inline C
in thread Bit vector fiddling with Inline C
Thanks for the useful benchmarking info vs Perl's vec(), and my apologies for lack of clarity in the OP. In answer to your queries:
>>If the real code is so complex, why are you asking us to make judgements based on such a trivial example that can never meet its stated goal of greater efficiency?<< I was trying to present a 'minimal case' to illustrate the particular aspects I'm unsure about.
>>The way you've asked the question suggests that you are unsure about the parameter handling rather than the actual internal logic. Where exactly do your doubts lie?<< What I'm unsure about is two things:
(a) Correct method for directly accessing the bytes of a Perl variable from Inline C? My example works but I'm not entirely sure it's the "right way". Is casting the return of SvPV to an unsigned char* a sensible thing to be doing?
(b) Whether directly changing the bytes of a Perl variable in C runs the risk of 'breaking' Perl internals in some scenarios?
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^3: Bit vector fiddling with Inline C
by BrowserUk (Patriarch) on May 09, 2011 at 13:47 UTC | |
by oxone (Friar) on May 09, 2011 at 16:52 UTC | |
by BrowserUk (Patriarch) on May 09, 2011 at 19:22 UTC | |
by oxone (Friar) on May 09, 2011 at 21:54 UTC | |
by syphilis (Archbishop) on May 10, 2011 at 02:12 UTC | |
|