<div dir="ltr"><div dir="ltr"><div class="gmail_quote"><div>Hi, </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
With modern macOS and modern hardware there are performance effects that<br>
you can't control, perhaps most significantly thermal throttling, but<br>
also background jobs like Time Machine backups and iCloud sync.<br>
<br>
You need to apply a little bit of statistical theory. Standard error<br>
increases with variance, but can be decreased by increasing the sample<br>
size. Calculate what sample size is needed to bring the standard error<br>
down to an acceptable level.<br></blockquote><div><br></div><div>I will try to get more samples this week. [1]. Till now I made so many changes to code that I had to reconduct tests.</div><div>Also, this seems to be right that many ports need to be tested. Even if I test a port 5 times in a row(everything else closed) and then I again conduct</div><div>testing 5 times in a row for the same port some other time, the results vary pretty nicely. Generally that applies mostly for real time. sys and user time show differences, but not that big.</div><div>Surprisingly, while testing this week I noticed __darwintrace_setup() took more time than __darwintrace_is_in_sandbox().</div><div>Generally I was thinking registry querying is the slowest of all but as per the times that I printed, it turns out that wasn’t the case.</div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"> <br></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">
<br>
I don't think there is much value in going to so much effort to ensure a<br>
completely cold cache before starting. Close other apps yes, but don't<br>
reboot or reinstall everything. Since we don't have control over disk<br>
cache misses, and a warm cache is more likely in the real world anyway,<br>
it's common practice to pre-warm the cache by doing one run before you<br>
start recording results.<br><br></blockquote><div><br></div><div><br></div><div>[1] <a href="https://docs.google.com/spreadsheets/d/1ksj3Fex-AnTEU4f4IRzwUkTpN4XfUye-HqSdZwXOsKs/edit#gid=0">https://docs.google.com/spreadsheets/d/1ksj3Fex-AnTEU4f4IRzwUkTpN4XfUye-HqSdZwXOsKs/edit#gid=0</a></div><div> </div></div></div></div>