Is it possible to compile regex rules in Node.js for faster use?
V8 automatically compiles regular expressions. See http://www.scribd.com/doc/16921039/V8-Internals-Building-a-High-Performance-JavaScript-Engine
Node.js is just JavaScript running on V8, so you really only have what V8 offers, namely:
var r = new RegExp("abc", 'i');
V8 will do its own optimization, perhaps even in built-in regular expressions.
Source: https://habr.com/ru/post/1414512/More articles:The profiler tells me that comparing with zero is slow - performanceActionScript 3 static analyzer with @ NotNull / @ Nullable support - actionscriptWhat is the difference between a vector and a matrix in MATLAB? - vectorHow to group identical values ββin sequence with LINQ? - c #JQuery progress bar - adding text and changing background color - jqueryPlay mp3 file using javascript onClick - javascriptHow to execute shell command in background? - emacsWhat is the difference between object, reference identifier and reference variable in Java? - javaunique random number generation - javaURL connection does not work in applet - javaAll Articles