Benchmark for some string operations.

This program benchmarks the following operations:

  • strcpy,
  • strlen,
  • strcat,
  • strcmp,
  • strrchr,
  • memcpy,
  • memcmp,
  • strstr.
Source file: bench-string.c
NameTimeTicks
Empty bench (correction) 8 us[17]
strcpy length 1 51 us[103]
strcpy length 16 209 us[419]
strcpy length 32 377 us[755]
strcat length 1 59 us[119]
strcat length 17 225 us[451]
strcat length 33 321 us[643]
strlen length 1 47 us[94]
strlen length 17 231 us[462]
strlen length 33 415 us[830]
strcmp length 33, -1 116 us[232]
strrchr at 17 718 us[1436]
strstr at 16 3864 us[7728]