As you pointed out in your pathetic 101-list (you linked to MSDN where one is told that regex should not be used with compilation when many different regexes are used) .NET can currently not unload appdomains.
Your example ueses several thousand different regexes with compilation. In every loop .NET has to create the code for the individual regex, and then compile it, load it, JIT it and execute it.
No wonder that memory-usage goes in the sky and it is slow like hell.
A fair comparison either uses no compilation OR lets the java-version execute javac in every loop (actually .NET has the very pity and poor behaviour to create a DLL in the temp-folder and load that assembly)
re:
Posted by
ceperez
at
2004-01-21 07:00 AM
Fair enough then, try removing the compilation feature and tell us how well it performs.
I assure you, it still isn't going to be very pretty!
As you pointed out in your pathetic 101-list (you linked to MSDN where one is told that regex should not be used with compilation when many different regexes are used) .NET can currently not unload appdomains.
Your example ueses several thousand different regexes with compilation. In every loop .NET has to create the code for the individual regex, and then compile it, load it, JIT it and execute it. No wonder that memory-usage goes in the sky and it is slow like hell.
A fair comparison either uses no compilation OR lets the java-version execute javac in every loop (actually .NET has the very pity and poor behaviour to create a DLL in the temp-folder and load that assembly)
Fair enough then, try removing the compilation feature and tell us how well it performs.
I assure you, it still isn't going to be very pretty!