Skip to content

Commit b5ae54c

Browse files
committed
adding a memcpy benchmark and ensure inlining.
1 parent 55723db commit b5ae54c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

benchmarks/bench_ip.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ void pretty_print(size_t volume, size_t bytes, std::string name,
2626
printf("\n");
2727
}
2828

29-
const char *seek_ip_end(const char *p, const char *pend) {
29+
fastfloat_really_inline const char *seek_ip_end(const char *p, const char *pend) {
3030
const char *current = p;
3131
size_t count = 0;
3232
for (; current != pend; ++current) {
@@ -48,7 +48,7 @@ const char *seek_ip_end(const char *p, const char *pend) {
4848
return current;
4949
}
5050

51-
int parse_u8_fastfloat(const char *&p, const char *pend, uint8_t *out) {
51+
fastfloat_really_inline int parse_u8_fastfloat(const char *&p, const char *pend, uint8_t *out) {
5252
if (p == pend)
5353
return 0;
5454
auto r = fast_float::from_chars(p, pend, *out);
@@ -59,7 +59,7 @@ int parse_u8_fastfloat(const char *&p, const char *pend, uint8_t *out) {
5959
return 0;
6060
}
6161

62-
static inline int parse_u8_fromchars(const char *&p, const char *pend,
62+
fastfloat_really_inline int parse_u8_fromchars(const char *&p, const char *pend,
6363
uint8_t *out) {
6464
if (p == pend) {
6565
return 0;
@@ -73,7 +73,7 @@ static inline int parse_u8_fromchars(const char *&p, const char *pend,
7373
}
7474

7575
template <typename Parser>
76-
std::pair<bool, uint32_t> simple_parse_ip_line(const char *p, const char *pend,
76+
fastfloat_really_inline std::pair<bool, uint32_t> simple_parse_ip_line(const char *p, const char *pend,
7777
Parser parse_uint8) {
7878
uint8_t v1;
7979
if (!parse_uint8(p, pend, &v1)) {

0 commit comments

Comments
 (0)