# Understanding User and Kernel Mode

**URL:** <https://discourse.codinghorror.com/t/understanding-user-and-kernel-mode/405>\
**Category:** blog\
**Created:** [January 3, 2008, 12:00am UTC](https://discourse.codinghorror.com/t/understanding-user-and-kernel-mode/405 "2008-01-03T00:00:00Z")\
**Posts on this page:** 1\
**Showing post:** 71

<div class="post-metadata">

**Author:** ![Chris\_Nahr](https://discourse-cdn.codinghorror.com/letter_avatar_proxy/v2/letter/c/48db29/32.png) [@Chris\_Nahr](https://discourse.codinghorror.com/u/Chris_Nahr)\
**Post date:** [January 6, 2008, 12:00am UTC](https://discourse.codinghorror.com/t/understanding-user-and-kernel-mode/405/71 "2008-01-06T00:00:00Z")

</div>

Addendum: I thought that maybe JIT inlining made a difference, so I tried manually inlining the throw statement, and disabling optimization to disable automatic inlining of the “return new Exception()” statement. Once again, no difference in the results.

Please don’t run amok and think exceptions are superbad and should be avoided just because of this, the trick is to use them for _exceptional_ conditions, and not to _abuse_ them for general control flow manipulation (and obviously not for tight loops ;)).

Sure, I know. I’m no Joel Spolsky, I’ll keep using exceptions for error handling. 🙂

Unfortunately, I did abuse .NET exceptions occasionally for regular flow control because I thought they would be fast enough to handle rarely visited branches. I’ll have to go back and check all those cases, and probably rewrite them.

---

_[View the full topic](https://discourse.codinghorror.com/t/understanding-user-and-kernel-mode/405)._
