Coffeehouse Post

Single Post Permalink

View Thread: is managed code faster than native?
  • User profile image
    BitFlipper

    One thing I found in both C# and C++ (STL), is to stay away from enumerators (foreach and begin()). Instead use simple integer loop indexing. There is a measurable performance drop in both cases when using enumerators.

    Where performance doesn't matter, using an enumerator is fine.