And that exact logic is what wouldn't work, if compilation or matching would be exponential, for example. Being able to say "as long as the inputs don't get astronomically long, the running time of the algorithm will be reasonable" is *exactly* the conclusion that a small complexity class gives you.
On Mon, Jun 8, 2020 at 7:17 PM Robert Engels <reng...@ix.netcom.com> wrote: > If the input regex string is bounded by a typical user input box - the > compilation time will be negligible when compared to the runtimes. > > On Jun 8, 2020, at 11:07 AM, Axel Wagner <axel.wagner...@googlemail.com> > wrote: > > > Oh, true, I overlooked that detail. But FTR, they clarify their question > subsequently and specifically ask whether compilation is linear in > expression size. No Must* in that clarification. > > On Mon, Jun 8, 2020 at 6:05 PM Thomas Bushnell, BSG <tbushn...@google.com> > wrote: > >> On Mon, Jun 8, 2020 at 12:02 PM Axel Wagner < >> axel.wagner...@googlemail.com> wrote: >> >>> On Mon, Jun 8, 2020 at 5:41 PM Thomas Bushnell, BSG < >>> tbushn...@google.com> wrote: >>> >>>> The OP was about MustCompile, so I think it's clear they are not using >>>> patterns passed in by external requests. >>>> >>> >>> I don't think that's clear at all. How do you assume patterns from >>> external sources can be matched, if not by compiling them? >>> >> >> "MustCompile is like Compile but panics if the expression cannot be >> parsed." >> >> Thomas >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAEkBMfEfJRPh5Zuedva87-PGTJOLHMYmpvsr4whxdFrx6TTySw%40mail.gmail.com.