Skip to content
Prev 55172 / 63424 Next

Proposed speedup of ifelse

Thanks Radford. I concur with all your points. I've attempted to address
the issues you raised through the github.io post.  The new method appears
to be slower for test lengths < 100 and possibly longer lengths (not just <
10). Of course length(test) < 100 is very quick, so I simply added this to
the conditions that cause the old ifelse method to be invoked. I'll leave
it to R-core to decide whether or not the benefits for longer vectors are
worth it.
On Fri, 4 May 2018 at 01:01 Radford Neal <radford at cs.toronto.edu> wrote: