There's sv_isa, which should be cheaper than sv_derived_from at the expense of not testing inheritance relationships. I dunno if the overload affects impacts the ability to use it.

Yeah, it's cheaper - but not cheap enough:) I was playing around with trying to upgrade the SV, and stuffing data in the free slots, then using those slots to validate the type. Seemed to work for simple examples, but blew up when used in the real world - overloading makes things more complicated.

Moving stuff safely across the Perl/C boundary can be expensive. Can you change the algorithm so that objects don't have to cross so often?

Not really, as the object is exposed to the end user.

Cheers,

jez.


Reply via email to