Skip to content
Snippets Groups Projects
Select Git revision
  • benchmark-tools
  • postgres-lambda
  • master default
  • REL9_4_25
  • REL9_5_20
  • REL9_6_16
  • REL_10_11
  • REL_11_6
  • REL_12_1
  • REL_12_0
  • REL_12_RC1
  • REL_12_BETA4
  • REL9_4_24
  • REL9_5_19
  • REL9_6_15
  • REL_10_10
  • REL_11_5
  • REL_12_BETA3
  • REL9_4_23
  • REL9_5_18
  • REL9_6_14
  • REL_10_9
  • REL_11_4
23 results

rege_dfa.c

Blame
    • Tom Lane's avatar
      c6aae304
      Simplify and document regex library's compact-NFA representation. · c6aae304
      Tom Lane authored
      The previous coding abused the first element of a cNFA state's arcs list
      to hold a per-state flag bit, which was confusing, undocumented, and not
      even particularly efficient.  Get rid of that in favor of a separate
      "stflags" vector.  Since there's only one bit in use, I chose to allocate a
      char per state; we could possibly replace this with a bitmap at some point,
      but that would make accesses a little slower.  It's already about 8X
      smaller than before, so let's not get overly tense.
      
      Also document the representation better than it was before, which is to say
      not at all.
      
      This patch is a byproduct of investigations towards extracting a "fixed
      prefix" string from the compact-NFA representation of regex patterns.
      Might need to back-patch it if we decide to back-patch that fix, but for
      now it's just code cleanup so I'll just put it in HEAD.
      c6aae304
      History
      Simplify and document regex library's compact-NFA representation.
      Tom Lane authored
      The previous coding abused the first element of a cNFA state's arcs list
      to hold a per-state flag bit, which was confusing, undocumented, and not
      even particularly efficient.  Get rid of that in favor of a separate
      "stflags" vector.  Since there's only one bit in use, I chose to allocate a
      char per state; we could possibly replace this with a bitmap at some point,
      but that would make accesses a little slower.  It's already about 8X
      smaller than before, so let's not get overly tense.
      
      Also document the representation better than it was before, which is to say
      not at all.
      
      This patch is a byproduct of investigations towards extracting a "fixed
      prefix" string from the compact-NFA representation of regex patterns.
      Might need to back-patch it if we decide to back-patch that fix, but for
      now it's just code cleanup so I'll just put it in HEAD.