From: Brian Candler Date: 2003-04-14T19:03:16+09:00 Subject: Re: Need IO Optimization help On Mon, Apr 14, 2003 at 05:57:06PM +0900, Robert Klemme wrote: > > well I suppose his point is that not using Fixnum you can have > > Counter.succ!, without the need for an assignment , written directly > > in C, possibly faster.. > > (and though possibly low level optimized as in "inc reg" vs "add > > reg,1" ) > > Hm, that would require some code duplications since you want this counter > to behave similarly like Fixnum+ which means the type of the internal > value vepresentation must be changeable etc. I find this quite ugly and I > don't know whether the performance improvement would justify this > ugliness. There wouldn't be any (noticeable) performance improvement anyway. It's the method dispatch which is IMO the main overhead, not the actual adding of 1 to a Fixnum, nor the assigning of the result to a local variable. Brian.