Closed joshuaulrich closed 7 years ago
But if it's a fast version of %in%
it wouldn't do the full match, just return when it finds the first match, and only scan the whole table if it didn't contain a match.
@jackwasey it's not scanning the table - it has to perform the check for every element either way, the hash table is used for the lookup hence no scanning.
One thing to test is if the indirection can cause extra copy of y
which would defeat teh purpose, bu tI'll address that separately.
fmatch
aims to be a drop-in replacement formatch
, and%in%
is just a simple wrapper aroundmatch
, so adding a fastmatch analogue to%in%
is straight-forward.Add '\keyword{logic}' to be consistent with base/man/match.Rd.
Fixes #2.