static StringPiece pc1 = "1234567890123456789";
-void handwrittenAtoiMeasure(uint n, uint digits) {
+void handwrittenAtoiMeasure(unsigned int n, unsigned int digits) {
auto p = pc1.subpiece(pc1.size() - digits, digits);
FOR_EACH_RANGE (i, 0, n) {
doNotOptimizeAway(handwrittenAtoi(p.begin(), p.end()));
}
}
-void follyAtoiMeasure(uint n, uint digits) {
+void follyAtoiMeasure(unsigned int n, unsigned int digits) {
auto p = pc1.subpiece(pc1.size() - digits, digits);
FOR_EACH_RANGE (i, 0, n) {
doNotOptimizeAway(folly::to<int64_t>(p.begin(), p.end()));
}
}
-void clibAtoiMeasure(uint n, uint digits) {
+void clibAtoiMeasure(unsigned int n, unsigned int digits) {
auto p = pc1.subpiece(pc1.size() - digits, digits);
assert(*p.end() == 0);
static_assert(sizeof(long) == 8, "64-bit long assumed");
}
}
-void clibStrtoulMeasure(uint n, uint digits) {
+void clibStrtoulMeasure(unsigned int n, unsigned int digits) {
auto p = pc1.subpiece(pc1.size() - digits, digits);
assert(*p.end() == 0);
char * endptr;
}
}
-void lexicalCastMeasure(uint n, uint digits) {
+void lexicalCastMeasure(unsigned int n, unsigned int digits) {
auto p = pc1.subpiece(pc1.size() - digits, digits);
assert(*p.end() == 0);
FOR_EACH_RANGE (i, 0, n) {
return length;
}
-void u64ToAsciiTableBM(uint n, uint64_t value) {
+void u64ToAsciiTableBM(unsigned int n, uint64_t value) {
// This is too fast, need to do 10 times per iteration
char buf[20];
FOR_EACH_RANGE (i, 0, n) {
return length;
}
-void u64ToAsciiClassicBM(uint n, uint64_t value) {
+void u64ToAsciiClassicBM(unsigned int n, uint64_t value) {
// This is too fast, need to do 10 times per iteration
char buf[20];
FOR_EACH_RANGE (i, 0, n) {
}
}
-void u64ToAsciiFollyBM(uint n, uint64_t value) {
+void u64ToAsciiFollyBM(unsigned int n, uint64_t value) {
// This is too fast, need to do 10 times per iteration
char buf[20];
FOR_EACH_RANGE (i, 0, n) {
// Benchmark uitoa with string append
-void u2aAppendClassicBM(uint n, uint64_t value) {
+void u2aAppendClassicBM(unsigned int n, uint64_t value) {
string s;
FOR_EACH_RANGE (i, 0, n) {
// auto buf = &s.back() + 1;
}
}
-void u2aAppendFollyBM(uint n, uint64_t value) {
+void u2aAppendFollyBM(unsigned int n, uint64_t value) {
string s;
FOR_EACH_RANGE (i, 0, n) {
// auto buf = &s.back() + 1;