[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Metatables for primitives performance?
- From: "Paul Chiusano" <paul.chiusano@...>
- Date: Tue, 28 Mar 2006 09:43:39 -0500
> > Also, I notice that overriding any of the operator
> > metamethods (like __div) for numbers has no effect. Is this for
> > performance reasons?
> Yes, very much so. Requiring a check for every primitive
> operation on numbers would slow Lua to a crawl.
Makes perfect sense. Thanks.