From: "Mauricio Fernández" Date: 2002-10-03T19:50:27+09:00 Subject: Re: tuples versus arrays On Thu, Oct 03, 2002 at 02:06:30PM +0900, Bulat Ziganshin wrote: > Hello Mauricio, > > Wednesday, October 02, 2002, 11:24:55 PM, you wrote: > >> it is another question. memory allocator is common to all classes, so > >> it's his problem - fast allocation of small memory areas. your idea is > >> only for case when class has ITS OWN memory sub-allocator > > MF> I was rather thinking of the common memory allocator using a separate > MF> area (and algorithm) if it is told the memory for a n-sized tuple. > > better approach - using special blocks for allocating 1-20 byte areas, > and one common block for all areas larger. tuple is not only one > structure with fixed size which ryby VM has to allocate > This is quite easy to implement in Ruby right now, but I don't know how big a speed increase we'd see. malloc and friends have been subject to serious optimization so it won't be easy to beat them even with a more specific allocator. -- _ _ | |__ __ _| |_ ___ _ __ ___ __ _ _ __ | '_ \ / _` | __/ __| '_ ` _ \ / _` | '_ \ | |_) | (_| | |_\__ \ | | | | | (_| | | | | |_.__/ \__,_|\__|___/_| |_| |_|\__,_|_| |_| Running Debian GNU/Linux Sid (unstable) batsman dot geo at yahoo dot com We come to bury DOS, not to praise it. -- Paul Vojta, vojta@math.berkeley.edu