Reduce allocs

While investigating performance issues, found out that there are a lot of unnecessary memory allocations. This does not have the performance impact as I was expecting, but I think its worth working on some of the points found. After testing with jemalloc, tcmalloc and mimalloc, only tcmalloc had a ~10% speedup on the example below, while mimalloc and jemalloc performed the same as the standard allocator.

heaptrack ./build/examples/wireless/ns3-dev-wifi-he-network --simulationTime=0.3 --frequency=5 --useRts=1 --minExpectedThroughput=6 --maxExpectedThroughput=745

Before patches

before

After patches

after

After previous patches + ipv4-l3-protocol one

after_ipv4l3

Edited by Gabriel Ferreira

Merge request reports

Loading