4 ms·
Lets say you time some code, and get a nice Gaussian at around 1ms say, but with a smaller peak far to the right (ie +20ms or so). The second peak is because yo
by magicalhippo 4y ago
Lets say you time some code, and get a nice Gaussian at around 1ms say, but with a smaller peak far to the right (ie +20ms or so). The second peak is because your thread got scheduled. You don't care about those samples, they don't matter.
Can't you just say those are outliers and not consider them? Ideally you'd build some bimodal model, but given that they don't matter, what's wrong with throwing away those samples?
- kqr 4y agoThis is the problem with how most people deal with outliers. You should absolutely care about your code being scheduled away. If you care about speed and then you change your code in ways that makes it get pre-empted more often, that matters! Outliers are still useful data!
- magicalhippo 4y agoIf you write code that gets pre-empted more often, then you've deliberately done that by inserting system calls or similar, and that would be an entirely different scenario. I agree that in such a scenario, it would not be an outlier.