<commit_before>package dregex

import org.scalatest.FunSuite
import dregex.impl.Util

class PerformanceTest extends FunSuite {
  
    test("slow regexs") {
      val (regexes, elapsed1) = Util.time {
        Regex.compile(Seq(
            "qwertyuiopasd",
            "/aaaaaa/(?!xxc)(?!xxd)(?!xxe)(?!xxf)(?!xxg)(?!xxh).*",
            "/aaaaaa/(?!x+c)(?!x+d)(?!x+e)(?!x+f)(?!x+g)(?!x+h).*",
            "/aaaaaa/(?!x+c|x+d|x+e|x+f|x+g|x+h).*",
            "/aaaaaa/(?!xxc)a(?!xxd)b(?!xxe)c(?!xxf).*", // disables lookahead combinations
            "/aaaaaa/(?!xxc|xxd|xxe|xxf|xxg|xxh).*"
          )).unzip._2
      }
      info(s"compilation time: ${elapsed1 / 1000} ms")
      val (_, elapsed2) = Util.time {
        regexes.tail.foreach(_ doIntersect regexes.head)
      }
      info(s"intersection time: ${elapsed2 / 1000} ms")
    }

}<commit_msg>Make performance test more strict<commit_after>package dregex

import org.scalatest.FunSuite
import dregex.impl.Util

class PerformanceTest extends FunSuite {

  test("slow regexs") {
    val (regexes, elapsed1) = Util.time {
      Regex.compile(Seq(
        "qwertyuiopasd",
        "/aaaaaa/(?!xxc)(?!xxd)(?!xxe)(?!xxf)(?!xxg)(?!xxh)[a-zA-Z0-9]{7}.*",
        "/aaaaaa/(?!x+c)(?!x+d)(?!x+e)(?!x+f)(?!x+g)(?!x+h)[a-zA-Z0-9]{7}.*",
        "/aaaaaa/(?!x+c|x+d|x+e|x+f|x+g|x+h)[a-zA-Z0-9]{7}.*",
        "/aaaaaa/(?!xxc)a(?!xxd)b(?!xxx)c(?!xxf)[a-zA-Z0-9]{7}.*", // disables lookahead combinations
        "/aaaaaa/(?!xxc|xxd|xxe|xxf|xxg|xxh)[a-zA-Z0-9]{7}.*",
        "/aaaaaa/(?!xxc.*)(?!xxd.*)(?!xxe.*)(?!xxf.*)(?!xxg.*)[a-zA-Z0-9]{7}.*"
        )).unzip._2
    }
    info(s"compilation time: $elapsed1")
    val (_, elapsed2) = Util.time {
      regexes.tail.foreach(_ doIntersect regexes.head)
    }
    info(s"intersection time: $elapsed2")
  }

}
{'fraction_non_alphanumeric': 0.253185595567867, 'fraction_numerical': 0.019944598337950138, 'mean_word_length': 2.9779735682819384, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7547845', 'n_tokens_mistral': 797, 'n_tokens_neox': 765, 'n_words': 87}