Hi,
Yeah, the [table]-based version is much much faster than the list-based version, so it can replace the old one; the upside is that it's also more transparent. I don't know about resizing tables either, so I agree to err on the side of caution. 100 seems appropriate. Attached a version which will resize the table up to the nearest hundred, and it will stay that way until it receives a list that's larger than the current table at which point it will add another hundred... that way it will adapt to list sizes in case it gets many lists in a row with more than 100 elements. It's still called [list-shellsort-tab] for clarity on the list.
Matt
Date: Wed, 3 Dec 2008 22:30:09 +0100 From: Frank Barknecht fbar@footils.org Subject: Re: [PD] list-sort To: pd-list@iem.at Message-ID: 20081203213009.GA9173@footils.org Content-Type: text/plain; charset=us-ascii
Hallo, Matt Barber hat gesagt: // Matt Barber wrote:
I had attached one to the last post I sent -- look for list-shellsort-tab.pd
Seems I had deleted that one by mistake - but I got it from the archives. That's very cool! Do you think I should replace the version in the SVN with the table version?
I'm just not quite sure if resizing the table should be a bit more conservative, as I believe, resizing tables is a bit costly in Pd (and it may lead to dsp-chain reorderings, but I don't know much about that topic.)
Probably we can get away with just keeping the default table size of 100 elements and only resize and free if the lists are longer than that.
Ciao
Frank