1 | // Licensed to the .NET Foundation under one or more agreements. |
2 | // The .NET Foundation licenses this file to you under the MIT license. |
3 | // See the LICENSE file in the project root for more information. |
4 | |
5 | // |
6 | // Set optimizations settings for small performance critical methods |
7 | // |
8 | |
9 | #ifdef FPO_ON |
10 | #error Recursive use of FPO_ON not supported |
11 | #endif |
12 | |
13 | #define FPO_ON 1 |
14 | |
15 | |
16 | #if defined(_MSC_VER) && !defined(_DEBUG) |
17 | #pragma optimize("t", on) // optimize for speed |
18 | #if !defined(_AMD64_) // 'y' isn't an option on amd64 |
19 | #pragma optimize("y", on) // omit frame pointer |
20 | #endif // !defined(_TARGET_AMD64_) |
21 | #endif |
22 | |