Optimization #1269
closed
Convert SM List from linked list to array
Added by Ken Steele about 10 years ago.
Updated about 9 years ago.
Description
Converting the SM List from a linked-list to an array would be better for cache utilization. These lists don't change after they are created.
An array removes the need for the next and previous pointers in the SigMatch structure. Might also be able to remove the idx field.
The lists doesn't change once matching starts, so the simplest solution would be to convert the from linked lists to arrays just before matching.
The SigMatch pointer is passed into the Match function, which appear to only use it to get their context information. It would be cleaner to only pass the context pointer to the Match function.
- Target version set to 3.0RC2
We could even consider using a static array of sigmatches for parsing. This will reduce the number of allocs during parsing quite a bit.
- Assignee set to Ken Steele
- Target version changed from 3.0RC2 to 2.1beta3
Implemented by Ken. Could still consider getting rid of the lists completely.
- Target version changed from 2.1beta3 to 2.1beta4
- Target version changed from 2.1beta4 to 3.0RC1
- Status changed from New to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF