3 ms·
The problematic code is: if (dbs_per_call > server.dbnum || timelimit_exit) dbs_per_call = server.dbnum; The post focused a lot of microarchitectu
by amluto 8y ago
The problematic code is:
if (dbs_per_call > server.dbnum || timelimit_exit)
dbs_per_call = server.dbnum;
The post focused a lot of microarchitectural issues, but I saw no mention of much bigger fish: is it really the case that the if statement always evaluates to false in Twitter’s use case? Knowing nothing about the code in question, I bet that the if condition, in fact, sometimes or always evaluates to true, and that the code doesn’t work as well when this happens.
- plasma 8y agoYes I wondered if `timelimit_exit was the cause as well.
- ShroudedNight 8y agoI'm not sure that's possible in this case: 1. The || operator should short-circuit 2. I'm not sure how a jg would sanely be used to check what is effectively a boolean.