If we are at it - and other tools are already faster, is there a chance
to also add a engine 3 reusing the fast code?
If we partially break with VimL (by improving python support) why
not also add a commonly used regex syntax if speed is different.
I've tried debugging gnugrep which was said to be faster:
dfasearch.c contains:
if ((err = re_compile_pattern (p, len,
&(patterns[pcount].regexbuf))) != NULL)
I was not able to step into re_compile_pattern, probably because its
using glibc's re_compile_pattern.
The problem is that I don't think you can use those regular expressions
to search for multiline patterns if can be found in different patterns.
Eg there is re_search_2 which does not work with an internal "regular
expression matching state", but concatenates two strings:
/* Like `re_search', but search in the concatenation of STRING1 and
STRING2. Also, stop searching at index START + STOP. */
extern int re_search_2 (struct re_pattern_buffer *__buffer,
const char *__string1, int __length1,
const char *__string2, int __length2, int __start,
int __range, struct re_registers *__regs, int __stop);
PCRE even started jitting:
https://github.com/hnakamur/pcre-jit-benchmark
http://sljit.sourceforge.net/pcre.html
and it supports multi-segment matching (which I guess would be required
to implement vim_regexec_multi ?
Bram, do you think its worth a try adding pcre support?
It shouldn't be too hard to translate Vim regular expressions to pcre
syntax before compiling.
Why should we continue spending time on maintaining this ourselves?
I haven't looked at all details but I think adding pcre support is
straight forward.
Thoughts?
Marc Weber
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.