[Rd] efficiency of sample() with prob.

Bo Peng ben.bob at gmail.com
Tue Aug 30 00:03:06 CEST 2005


> It seems the distribution used for your tests is maximally favourable to 
> your proposal (not uncommon in papers, but not very honest).  

I did not have time to do a thorough test. I was simply reporting what
I had done so any implied dishonesty is unfair to me.

> Changing how this is done will break the reproducibility of past programs,
> and we don't really want to introduce yet more options.  So it seems only
> worth doing when there are substantial speed gains. 

I agree that Walker's method may be slow at some cases but there is
nothing to brag about R's current method either. The bottom line is: a
bisection method will be uniformly better than the linear search
method that R uses right now. This does not qualify as 'substantial
speed gain' though.

Cheers,
Bo



More information about the R-devel mailing list