View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004225 | NoesisGUI | C++ SDK | public | 2025-06-05 11:46 | 2025-06-05 12:05 |
| Reporter | jsantos | Assigned To | jsantos | ||
| Priority | normal | Severity | feature | ||
| Status | assigned | Resolution | open | ||
| Product Version | 3.2.8 | ||||
| Summary | 0004225: Optimize Delegate Implementation to Use Two-Pointer Thunks | ||||
| Description | Our current delegate implementation is functional but not optimal in terms of performance and memory usage. We propose a significant optimization: a redesign of our delegates using only two pointers, one for this, and one function pointer to a template thunk corresponding to the delegate type (free function, member function, or lambda_ref). Our delegates are fast but they could be faster and require less memory if we implemented then with just two pointers for all cases. The first pointer for this and the second one a function pointer to a template thunk for the corresponding case: func, member_func and lambdas. Something like this:
And the usage would be:
Benefits:
Tradeoffs / Breaking Changes:
On top of this, we still need a vector for the multidelegate. More information: https://www.codeproject.com/Articles/1170503/The-Impossibly-Fast-Cplusplus-Delegates-Fixed | ||||
| Platform | Any | ||||
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2025-06-05 11:46 | jsantos | New Issue | |
| 2025-06-05 11:46 | jsantos | Assigned To | => jsantos |
| 2025-06-05 11:46 | jsantos | Status | new => assigned |
| 2025-06-05 11:46 | jsantos | Description Updated | |
| 2025-06-05 11:49 | jsantos | Description Updated | |
| 2025-06-05 11:58 | jsantos | Description Updated | |
| 2025-06-05 11:59 | jsantos | Description Updated | |
| 2025-06-05 12:03 | jsantos | Description Updated | |
| 2025-06-05 12:05 | jsantos | Description Updated |