Skip to content

Custom Event to Listener Maps #15

@ZeroMemes

Description

@ZeroMemes

There's no way to control the underlying implementation of EventManager.activeListeners.

The current implementation in 3.0.0 is backed by a Reference2ObjectOpenHashMap, which is allowed to infinitely grow. However, some applications may use an EventBus which has a fixed amount of known event types (Baritone 👀). In such a case, a perfect hashing function could be used for optimized lookup.

I'll need to do some research into automatically generating perfect hash functions, and a lot of benchmarking to see if/when something like this can actually have a statistically significant performance benefit.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions