Project

General

Profile

Actions

Optimization #1269

closed

Convert SM List from linked list to array

Added by Ken Steele over 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Target version:
Effort:
Difficulty:
Label:

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.

Actions #1

Updated by Ken Steele over 9 years ago

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.

Actions #2

Updated by Victor Julien over 9 years ago

  • 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.

Actions #3

Updated by Victor Julien over 9 years ago

  • 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.

Actions #4

Updated by Victor Julien over 9 years ago

  • Target version changed from 2.1beta3 to 2.1beta4
Actions #5

Updated by Victor Julien almost 9 years ago

  • Target version changed from 2.1beta4 to 3.0RC1
Actions #6

Updated by Victor Julien over 8 years ago

  • Status changed from New to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF