Skip to content

Replace std::function with a faster implementation #164

@Dawoodoz

Description

@Dawoodoz

The goal is to prevent unexpected heap allocations that ruin performance, and call heap.h when a heap allocation is actually needed, so that memory leaks can be detected without needing external tools.

Might be possible to implement a system with multiple interoperable types of lambdas using static inheritance. The temporary lambda type given to functions contains the function pointer and a pointer to captured data. Storable lambdas are abstract and inherit from temporary lambdas and implements copy, move and assignment operations with reference counting to any heap allocation.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions