Re: Number of BBCode params and permutation
Reply #32 – August 11, 2015, 11:09:16 pm
Oh, wait, the comparison includes the preg_match in the pc_next_permutation test and not in the other? Ugh, I really need to get my damn computer back. This is killing me. I know that the proposed permute function works but now I want to test it against dougiefresh's. If his works and does so with much less resources and a limitless number of parameters, seems like his would be the way to go.
Re: Number of BBCode params and permutation
Reply #33 – August 11, 2015, 11:16:18 pm
I really want to know, looking at a large number of posts with BBC, how often would the preg condition not match within X tries. Where X is whatever would add any measurable amount of time. Would be nice to have a couple of forums to be able to do some data analysis on.
Re: Number of BBCode params and permutation
Reply #34 – August 12, 2015, 08:40:25 am
I only did a simple test of performance on that, using quote blocks. Had a message with 10 quotes, some normal, some nested, with a couple of them using all 3 parameters out of order. Ran 3 loops of 100. Old permute function: Avg 3.73421 seconds in parse bbc and .19034 seconds in pre parse New permute function: Avg 3.7125 seconds in parse bbc and .18801 seconds in pre parse Net: no difference, should have checked memory but for 3 parameters they should be about equal per previous postings based on 3 parameters.
Re: Number of BBCode params and permutation
Reply #38 – January 07, 2017, 05:32:06 pm
Personally I like what we have, and its likely faster anyway.
Re: Number of BBCode params and permutation
Reply #39 – January 10, 2017, 01:02:05 am
The only thing I think might make sense to pull is the sorting of the parameters so there is no need to put the regular expression in a loop.
Re: Number of BBCode params and permutation
Reply #43 – January 26, 2017, 10:06:14 pm
Have you tried ordering the parameters? Just wondering if that had any positive effect.