Overly Clever Optimizations

Because who needs simplicity when you can have excessive complexity?

Here's where we indulge in the most convoluted, self-referential code possible.

Our Featured Optimization: Unnecessary Regexes!

Regular expressions are great, but have you ever thought to embed one inside another regular expression?

Check it out:

    var regex = /(?:\d+)/g;
    while (true) {
      var match = regex.exec("Hello, world!");
      console.log(match);
    }
  

It's like a Russian nesting doll of regular expressions!

Other Overly Clever Optimizations:

(Don't ask us why. We're still trying to figure it out.)