Jump to content
  • Advertisement

Nicolas Guillemot

  • Content Count

  • Joined

  • Last visited

Community Reputation

167 Neutral

About Nicolas Guillemot

  • Rank
  1. Nicolas Guillemot

    Is C++ RTTI good or bad?

    Thought I'd mention... A popular solution to getting rid of dynamic_cast is using the Visitor pattern, but Stroustrup hates that pattern.   Him and his students have been looking into alternative methods. (https://isocpp.org/blog/2013/02/open-and-efficient-type-switch-for-c-solodkyy-dos-reis-and-stroustrup)
  2. Not everything uses the zero-cost exception model. Namely, emscripten. () Furthermore, exceptions (zero-cost or not) depend on RTTI, which is non-ideal.
  3. Regarding exceptions... This is anecdotal evidence, but I've made some toy graphics applications that use exceptions, and noticed that weaker PCs would grind down to a halt if a bug caused an exception to be thrown at every frame of gameplay. I didn't figure out why, but I assume something is being totally thrown off. Makes me think games are better off just ignoring errors and just logging/asserting in debug builds instead. I asked some emscripten people about best practices for exceptions, and the answer was something like "no dude... just... just don't." so it seems like you can't safely assume exceptions are okay universally.
  4. Nicolas Guillemot

    Array realloc size

    There's an interesting analysis of the effect of realloc sizes here: https://github.com/facebook/folly/blob/master/folly/docs/FBVector.md
  5. Nicolas Guillemot

    Is C++ RTTI good or bad?

    Tino Didriksen did a really nice profiling of the relative costs of casts here: http://tinodidriksen.com/2010/04/14/cpp-dynamic-cast-performance/ You can see how the costs of dynamic_cast can grow pretty large.
  6. The discussion is here: https://groups.google.com/d/msg/unofficial-real-time-cxx/8oPFd52Rk10/kofd0p5FWwQJ
  7. Thanks to other posters for helping summarize.   There are actually currently ongoing proposals for SIMD types and static reflection, so it's not as sci-fi as you may think. Mainly we're interested in making sure that those features are implemented in a way that make it possible to solve common game development problems. For example, great care has to be taken with alignment because C types only need alignment up to 8. If the language was aware of 16-aligned SIMD values, then that could become a default minimum alignment for things like new/malloc, which fixes many problems related to new and allocators and function calling and etc.   The SoA/AoS is just an idea for a use case of static reflection, and it happens to mesh well with SIMD. Some other languages make this possible (eg: ISPC), and the result is that programmers can easily experiment with different layouts to find optimal configurations. Do note that N4456 is not a proposal, it's just a paper where we tried to summarize some ideas. Actual proposals or proofs of concept might come out of discusssions with this. flat_map is a candidate for making an actual proposal out of.
  8. Figured people here might be interested in this: Some game developers met up at cppcon 2014 and decided we wanted to try to address issues in C++ for use in game development. We're planning to present our findings to the C++ standards committee in Lenexa in the month of May. This is a work in progress rough draft, so it would be great to get some feedback from game developers before we go and present this! http://open-std.org/JTC1/SC22/WG21/docs/papers/2015/n4456.pdf We are mostly building on the work set out by the EASTL paper, so this paper is also of interest: http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2007/n2271.html Thanks!
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!