↓ Archives ↓

Archive → March, 2009

Managed Code Performance

Yesterday, I spent 2 hours to rewrite one parser code that my report wrote. The goal was to see if the parser could perform better while the code looks more organized and simpler to follow. For every text process, I tend to use the regular expression because of the simplicity and cleanness it provides, but I was not 100% sure if it could overcome the performance issue as Managed Code is known to be slow in many aspects.

The first attempt was disaster as it took probably 2 or 3 times more to process the same amount of data. While I was reading the code again before I gave up, I realized one mistake and one thing that I forgot. Regular expression in .NET is slow by default during run-time unless a specific option is specified during initialization – RegexOptions.Compiled.

http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regexoptions.aspx

Also here is a good MSDN article about the improving the performance of the base library.

http://msdn.microsoft.com/en-us/magazine/cc163670.aspx

Chef

보통 와이프가 임신했다고 하면 여러가지 이유로 식사가 힘들어 진다고 한다. 입덧부터 시작해서 몸이 힘들어서 못하는 것 까지. 와이프가 임신한지 30주가 넘었는데, 지금까지 생활을 생각해보면 난 참 복 많은 남자다라는 결론이 나왔다. 입덧? 거의 없었다. 임신해서 힘들어서 식사 소흘? 자랑이라면 자랑이지만 와이프가 힘들으니깐 대충 먹자고 내가 아무리 말리고 뭐해도 식사의 quality에는 변함이 없다는 것이 사실이다. 아내가 지금 까지 만든 음식 사진을 찍은 것이 조금 되지만 일단 최근에 만들어 먹은 것 몇개만 공개한다. ^_^

_MG_2936

_MG_2933

_MG_2946

Hunger crisis at heart of N. Korea’s troubles

To article