Skip to content

Using some fixed size arrays #27

@Lol3rrr

Description

@Lol3rrr

Problem

Right now all strings are dynamically allocated, this is the best option for memory consumption as it only uses what it actually needs. However from a performance point this is not the best, as you mostly try to reduce the amount of memory you allocate at runtime and especially for short strings it's honestly kind of a waste.

Solution

For certain things, there should be fixed size arrays.
One good example is the Request-Method as this has only a couple of options and even the worst case scenario only wastes a couple of bytes, so no big deal.
This however should help to keep the allocations lower and overall removes one problem that needs to be managed with that dynamic memory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions