izard: (Default)
[personal profile] izard
I was recently working on a problem, where one of the performance metrics I measured was ~100x higher than expected. It is almost impossible to make a 100x optimization, unless something is severely broken...

In the end, it appeared to be my error. But it was not a measurement error, I triple checked my measurement code and it was correct.

The buggy part was printing the end result. I made a typo in printf format, "%ull" instead of "%llu", so it printed "ll" in the end. Then I mistook "ll" for "11" when reading, and this multiplied the result 100x. I was slightly curious why random performance readings always end with 11, but I still did not catch it. Only after I pasted the result to Excel to plot a graph I realized what went wrong.
This made it in my list of top 5 stupid programming errors I ever made :)

Date: 2020-05-06 03:45 pm (UTC)
juan_gandhi: (Default)
From: [personal profile] juan_gandhi
Забавно, конечно.

Profile

izard: (Default)
izard

July 2025

S M T W T F S
  12345
67 89101112
13141516171819
20212223242526
2728293031  

Most Popular Tags

Page Summary

Style Credit

Expand Cut Tags

No cut tags
Page generated Jul. 9th, 2025 03:33 pm
Powered by Dreamwidth Studios