-
Notifications
You must be signed in to change notification settings - Fork 279
Closed
Labels
OptimizationOptimization related stuffOptimization related stuff
Description
Now that C++20 is widely available and support, we should consider updating Overload to take advantage of it.
Some features we could use from C++20:
| Feature | Use case |
|---|---|
std::string::ends_with and std::string::starts_with |
Checking file extension |
| likely and unlikely attributes | Flag unlikely paths, with component updates for instance |
Map/Set contains |
We use std::map and std::set in some places, and we could use this feature |
| Designated initializers | To initialize descriptors with specific values |
consteval |
Could be used to generate default values (identity matrix...) |
| Concept | Could be used for our component-based implementations (derived_from, convertible_to...) |
| Synchronized buffered outputstream | Could be used to make moving our logging system to another thread easier |
std::span |
Could make some of our functions more generic/work with more collection types |
| Bit operations | Would simplify some of our pipeline state operations and enum flags |
| Math constants | So we don't have to define pi and euler's number |
| Heap allocated arrays with smart pointer | i.e. std::make_shared<int[]>(5) |
std::bit_cast |
Safer way to reinterpret an object from one type to another |
| Bit-field initializers | Could simplify the initialization of default values for structs like PipelineState |
erase_if |
Instead of using remove_if + erase, it would simplify a bunch of our code |
source_location::current() |
Instead of __LINE__ and __FILE__, to trace assert locations |
std::bind_front |
Instead of using std::bind with std::placeholder::_1 (shorter syntax) |
std::lerp |
Could be used in OvMaths and might be better vectorized |
... and more!
Metadata
Metadata
Assignees
Labels
OptimizationOptimization related stuffOptimization related stuff