I am looking for some help identifying a reasonable a good mechanism for measuring the performance impact of some changes that I am toying around for the runtime on Windows.
Given the previously shared plan for Windows (Upcoming changes to Windows Swift SDKs), I wanted to start understanding the impact of the next set of changes that I think would be beneficial for the Swift community.
The previously mentioned changes are predicated on the split runtimes build. This gives us finer control over what and how we build. As such, I think that we can start investing now in some of the security mitigation techniques. My current thought is to try to enable a set of additional security related options when building the runtime:
- SSP (Stack Smash Protection)
- CET (Control Flow Enforcement Technology)
- DEP (Data Execution Prevention)
- PAC (Pointer Authentication Checking)
- CFG (Control Flow Guard)
- ACG (Arbitrary Code Guard)
- Spectre mitigations
A number of these are relatively minor in cost (e.g. SSP adds a stack canary and checks the canary on exit). Otherws may be more costly, e.g. the spectre mitigations.
I am hoping to find a good representative set of tests that we could use to identify the performance cost associated with the changes. I would not want to enable the security protections if they would incur an unreasonable penalty, but I also want to avoid having to have a separate runtime if you want a safe program by default. That is very much the philosophy of Swift and so it makes sense to enable as much of the security tools as reasonable by default.
I would appreciate if the community is able to help identify an appropriate test set for bench-marking the runtime performance on Windows.