Re: Union slowdown when SameTest is specified
- To: mathgroup at smc.vnet.net
- Subject: [mg101408] Re: Union slowdown when SameTest is specified
- From: Jacob Siehler <jsiehler at gmail.com>
- Date: Sun, 5 Jul 2009 04:48:20 -0400 (EDT)
- References: <h2kjfb$in3$1@smc.vnet.net>
Thanks for the uniformly excellent replies. I figured on overhead for calling the function but that wasn't enough to explain what was going on, which was pretty clearly (well, "clearly", based on more tests than I put in my original post) an outright change in complexity. In hindsight the utility of using an ordering relation to make fast sorting part of the Union algorithm makes perfect sense, and explains the problem here to my satisfaction. It would have been a long time before I thought of that on my own. Special kudos to Leonid for the additional code and links.