1
0
mirror of https://sourceware.org/git/glibc.git synced 2026-01-06 11:51:29 +03:00

Make strtok benchmark competive.

We include a generic version of strtok to result which could be faster
when underlying primitives are better optimized than current version.
This commit is contained in:
Ondřej Bílka
2014-02-28 22:45:33 +01:00
parent f08e9a2629
commit 7b3551e3a8
2 changed files with 8 additions and 57 deletions

View File

@@ -22,6 +22,10 @@ static char *olds;
#undef strtok
#ifndef STRTOK
# define STRTOK strtok
#endif
/* Parse S into tokens separated by characters in DELIM.
If S is NULL, the last string strtok() was called with is
used. For example:
@@ -32,7 +36,7 @@ static char *olds;
// s = "abc\0=-def\0"
*/
char *
strtok (s, delim)
STRTOK (s, delim)
char *s;
const char *delim;
{