Major flaw in particle stuff

  • Felix
    4th Dec 2010 Member 0 Permalink
    VTables are slow as hell, so GLHF with that speed improvement.
  • zc00gii
    4th Dec 2010 Banned 0 Permalink
    This post is hidden because the user is banned
  • Moach
    4th Dec 2010 Member 0 Permalink
    well, they don't HAVE to be VTables... that's just a general concept... the key idea is to use function references instead of a long sequence of if-else checks...

    i'm well aware that virtual functions must be "called", preventing them from being inlined at compile time.... so it wouldn't be as fast as using a large switch block....

    either way - read up on this (quite interesting C++ myth-busting)

    it's all a matter of how you setup you program flow.... a function pointer would only need to be fetched once for every pixel where a particle is, then inside that function, a loop for checking neighbors is done, inside which, a switch block determines how particles react to other types that come in contact with it - no "ifs" - all is done as cleanly as possible and without unneeded checks

    that was my point....
  • Dragonfree97
    4th Dec 2010 Member 0 Permalink
    necro

    Seriously, dude, this topic's from last year.
  • DAVPPK
    4th Dec 2010 Banned 0 Permalink
    This post is hidden because the user is banned
  • plypencil
    4th Dec 2010 Member 0 Permalink
    May I ask what happened to zc00gii?
  • Moach
    4th Dec 2010 Member 0 Permalink
    not necro - rules says 30 days, even though this hasn't been updated since well, last year

    happy that, anyways
  • DAVPPK
    4th Dec 2010 Banned 0 Permalink
    This post is hidden because the user is banned
  • HeyJD
    4th Dec 2010 Member 0 Permalink
    plypencil
    He asked to be banned.