pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Improve performance of fixempties() pass in regular-expression c 6+ messages / 1 participants [nested] [flat]
* pgsql: Improve performance of fixempties() pass in regular-expression c @ 2015-10-16 19:56 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2015-10-16 19:56 UTC (permalink / raw) To: pgsql-committers Improve performance of fixempties() pass in regular-expression compiler. The previous coding took something like O(N^4) time to fully process a chain of N EMPTY arcs. We can't really do much better than O(N^2) because we have to insert about that many arcs, but we can do lots better than what's there now. The win comes partly from using mergeins() to amortize de-duplication of arcs across multiple source states, and partly from exploiting knowledge of the ordering of arcs for each state to avoid looking at arcs we don't need to consider during the scan. We do have to be a bit careful of the possible reordering of arcs introduced by the sort-merge coding of the previous commit, but that's not hard to deal with. Back-patch to all supported branches. Branch ------ REL9_1_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/5503e6e0f32baae3e3a4e952d2c493fc20505363 Modified Files -------------- src/backend/regex/regc_nfa.c | 249 +++++++++++++++++++++--------------------- src/backend/regex/regcomp.c | 6 +- 2 files changed, 128 insertions(+), 127 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve performance of fixempties() pass in regular-expression c @ 2015-10-16 19:56 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2015-10-16 19:56 UTC (permalink / raw) To: pgsql-committers Improve performance of fixempties() pass in regular-expression compiler. The previous coding took something like O(N^4) time to fully process a chain of N EMPTY arcs. We can't really do much better than O(N^2) because we have to insert about that many arcs, but we can do lots better than what's there now. The win comes partly from using mergeins() to amortize de-duplication of arcs across multiple source states, and partly from exploiting knowledge of the ordering of arcs for each state to avoid looking at arcs we don't need to consider during the scan. We do have to be a bit careful of the possible reordering of arcs introduced by the sort-merge coding of the previous commit, but that's not hard to deal with. Back-patch to all supported branches. Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/e9cf3dc30a4ed82f2c284240841678db15491669 Modified Files -------------- src/backend/regex/regc_nfa.c | 249 +++++++++++++++++++++--------------------- src/backend/regex/regcomp.c | 6 +- 2 files changed, 128 insertions(+), 127 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve performance of fixempties() pass in regular-expression c @ 2015-10-16 19:56 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2015-10-16 19:56 UTC (permalink / raw) To: pgsql-committers Improve performance of fixempties() pass in regular-expression compiler. The previous coding took something like O(N^4) time to fully process a chain of N EMPTY arcs. We can't really do much better than O(N^2) because we have to insert about that many arcs, but we can do lots better than what's there now. The win comes partly from using mergeins() to amortize de-duplication of arcs across multiple source states, and partly from exploiting knowledge of the ordering of arcs for each state to avoid looking at arcs we don't need to consider during the scan. We do have to be a bit careful of the possible reordering of arcs introduced by the sort-merge coding of the previous commit, but that's not hard to deal with. Back-patch to all supported branches. Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/677e64cb8042ff6002069f1b587d933f4cdee925 Modified Files -------------- src/backend/regex/regc_nfa.c | 249 +++++++++++++++++++++--------------------- src/backend/regex/regcomp.c | 6 +- 2 files changed, 128 insertions(+), 127 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve performance of fixempties() pass in regular-expression c @ 2015-10-16 19:56 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2015-10-16 19:56 UTC (permalink / raw) To: pgsql-committers Improve performance of fixempties() pass in regular-expression compiler. The previous coding took something like O(N^4) time to fully process a chain of N EMPTY arcs. We can't really do much better than O(N^2) because we have to insert about that many arcs, but we can do lots better than what's there now. The win comes partly from using mergeins() to amortize de-duplication of arcs across multiple source states, and partly from exploiting knowledge of the ordering of arcs for each state to avoid looking at arcs we don't need to consider during the scan. We do have to be a bit careful of the possible reordering of arcs introduced by the sort-merge coding of the previous commit, but that's not hard to deal with. Back-patch to all supported branches. Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/18b032f8ff156fc482202cddb46b4b457c55cf11 Modified Files -------------- src/backend/regex/regc_nfa.c | 249 +++++++++++++++++++++--------------------- src/backend/regex/regcomp.c | 6 +- 2 files changed, 128 insertions(+), 127 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve performance of fixempties() pass in regular-expression c @ 2015-10-16 19:56 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2015-10-16 19:56 UTC (permalink / raw) To: pgsql-committers Improve performance of fixempties() pass in regular-expression compiler. The previous coding took something like O(N^4) time to fully process a chain of N EMPTY arcs. We can't really do much better than O(N^2) because we have to insert about that many arcs, but we can do lots better than what's there now. The win comes partly from using mergeins() to amortize de-duplication of arcs across multiple source states, and partly from exploiting knowledge of the ordering of arcs for each state to avoid looking at arcs we don't need to consider during the scan. We do have to be a bit careful of the possible reordering of arcs introduced by the sort-merge coding of the previous commit, but that's not hard to deal with. Back-patch to all supported branches. Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/f5b7d103bc4a97a64f9e8ca83192a96767d9a34c Modified Files -------------- src/backend/regex/regc_nfa.c | 249 +++++++++++++++++++++--------------------- src/backend/regex/regcomp.c | 6 +- 2 files changed, 128 insertions(+), 127 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Improve performance of fixempties() pass in regular-expression c @ 2015-10-16 19:56 Tom Lane <tgl@sss.pgh.pa.us> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2015-10-16 19:56 UTC (permalink / raw) To: pgsql-committers Improve performance of fixempties() pass in regular-expression compiler. The previous coding took something like O(N^4) time to fully process a chain of N EMPTY arcs. We can't really do much better than O(N^2) because we have to insert about that many arcs, but we can do lots better than what's there now. The win comes partly from using mergeins() to amortize de-duplication of arcs across multiple source states, and partly from exploiting knowledge of the ordering of arcs for each state to avoid looking at arcs we don't need to consider during the scan. We do have to be a bit careful of the possible reordering of arcs introduced by the sort-merge coding of the previous commit, but that's not hard to deal with. Back-patch to all supported branches. Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/8cf4eed0b0f25063e3d09933cf7334cc95094307 Modified Files -------------- src/backend/regex/regc_nfa.c | 249 +++++++++++++++++++++--------------------- src/backend/regex/regcomp.c | 6 +- 2 files changed, 128 insertions(+), 127 deletions(-) -- Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-committers ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2015-10-16 19:56 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-10-16 19:56 pgsql: Improve performance of fixempties() pass in regular-expression c Tom Lane <tgl@sss.pgh.pa.us> 2015-10-16 19:56 pgsql: Improve performance of fixempties() pass in regular-expression c Tom Lane <tgl@sss.pgh.pa.us> 2015-10-16 19:56 pgsql: Improve performance of fixempties() pass in regular-expression c Tom Lane <tgl@sss.pgh.pa.us> 2015-10-16 19:56 pgsql: Improve performance of fixempties() pass in regular-expression c Tom Lane <tgl@sss.pgh.pa.us> 2015-10-16 19:56 pgsql: Improve performance of fixempties() pass in regular-expression c Tom Lane <tgl@sss.pgh.pa.us> 2015-10-16 19:56 pgsql: Improve performance of fixempties() pass in regular-expression c Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox