https://bugs.exim.org/show_bug.cgi?id=2430

            Bug ID: 2430
           Summary: Severe performance decrease in (8-bit)
                    case-insensitive mode
           Product: PCRE
           Version: 10.32 (PCRE2)
          Hardware: x86-64
                OS: Linux
            Status: NEW
          Severity: bug
          Priority: medium
         Component: Code
          Assignee: p...@hermes.cam.ac.uk
          Reporter: andreas.bergm...@cyren.com
                CC: pcre-dev@exim.org

I noticed a performance decrease in (8-bit) case-insensitive mode by a factor
of 100 when searching large buffers, which feels like a defect.

At least it should go into the documentation.

The pattern is "(?i)abc" vs. "aA][bB][cC]", the test data is 1 MB of random
text like "|w67i0sao-t032-tju-aeo-pk829a4vflh3\r\n".

------------------------------------------------------------------------

$ perf record ./TestPCRE

 1048576 bytes    0.016975 sec   (?i)abc

Samples: 66  of event 'cycles:ppp', Event count (approx.): 53979758             
Overhead  Command   Shared Object      Symbol                                   
  89.89%  TestPCRE  libc-2.24.so       [.] memchr
   5.59%  TestPCRE  [kernel.kallsyms]  [k] clear_page_c_e
   4.41%  TestPCRE  [kernel.kallsyms]  [k] filemap_map_pages
   0.10%  perf_4.9  [kernel.kallsyms]  [k] native_irq_return_iret
   0.01%  perf_4.9  [kernel.kallsyms]  [k] native_write_msr

------------------------------------------------------------------------

$ perf record ./TestPCRE

 1048576 bytes    0.000111 sec   [aA][bB][cC]

Samples: 9  of event 'cycles:ppp', Event count (approx.): 6553514               
Overhead  Command   Shared Object      Symbol                                   
  41.23%  TestPCRE  [kernel.kallsyms]  [k] filemap_map_pages
  39.25%  TestPCRE  libc-2.24.so       [.] __memset_avx2_erms
  18.47%  TestPCRE  [kernel.kallsyms]  [k] vma_compute_subtree_gap
   1.00%  perf_4.9  [kernel.kallsyms]  [k] perf_event_addr_filters_exec
   0.05%  perf_4.9  [kernel.kallsyms]  [k] native_write_msr

------------------------------------------------------------------------

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-- 
## List details at https://lists.exim.org/mailman/listinfo/pcre-dev 

Reply via email to