At 5:16 PM +0100 8/10/04, Nicholas Clark wrote:
On Mon, Aug 09, 2004 at 03:11:53PM -0400, Dan Sugalski wrote:
At 11:57 AM -0700 8/9/04, chromatic wrote:

 >Is there a particular hash lookup style you have in mind?  If there's
 >something similar in the code already, I can copy, paste, and modify the
 >generator trivially.

 You could look at what we do for class registration -- that code
 might be similar. I don't think we've got too much at the C level
 that messes around with parrot hashes yet, though.

Does the structure change at runtime? (ie can one register new dynamically loaded NCI helper code?)

If not, a generated switch statement would work as well as a data structure,
surely?

The hash is constant (as are the current signature things), so we should be fine with a compile-time construct like a big switch statement. Either way, as long as the garbage collector doesn't eat it. :)


Speed isn't that big an issue here, since this is all initialization code anyway--you call it once per function when the function's registered with parrot. While we certainly don't want it slow, which the current system is very likely to be with more function signatures, there's a limit to how much worrying's worth it. I'd expect our built-in hash to be more than faast enough for the purpose.
--
Dan


--------------------------------------it's like this-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to