c# - What's faster: Regex or string operations? -


when should use regex on string operations , vice versa regarding performance?

it depends

although string manipulation faster, actual performance heavily depends on number of factors, including:

  • how many times parse regex
  • how cleverly write string code
  • whether regex precompiled

as regex gets more complicated, take more effort , complexity write equivlent string manipulation code performs well.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Socket.connect doesn't throw exception in Android -

iphone - How do I keep MDScrollView from truncating my row headers and making my cells look bad? -