From: Robert Klemme Date: 2003-04-14T17:57:06+09:00 Subject: Re: Need IO Optimization help "gabriele renzi" schrieb im Newsbeitrag news:pgmf9vg5q2civ352sbiffv5onqa2vu5k7f@4ax.com... > il Sat, 12 Apr 2003 03:25:47 +0900, Brian Candler > ha scritto:: > >You can eliminate the extra argument by doing > > > > mycounter = mycounter.succ > > 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. Until now I've seen cleanness and simpleness as one of the core features of ruby that I would not want to see easily sacrificed. If this solution would proove significant more efficient than the current I guess best would be to provide it as an add on module. Regards robert