Announcement

Collapse
No announcement yet.

Filtering break nodes - efficiency?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Filtering break nodes - efficiency?

    Hello,

    I have a number of structs in my game, with undoubtedly more to come. Some of these contain quite a few variables but in many instances I only need one or two of them.

    So, my question is: If I deselect some of the variables in the 'pin options' in the details panel of a break node, does this make a difference to the code that gets compiled?

    Part of me expects it to be more efficient as I imagine it retrieving fewer variables from the struct. However, another part of me wonders if it's purely visual for the purposes of tidying up the blueprint and that it doesn't make any difference to the compiled code at all.

    Thanks!

    #2
    Honestly, it shouldn't make "that" huge of a difference either way. It's 2017 and we typically have machines with 8 logical cores and 8-16gb of ram on average. If you were coding a game for MSDOS, then yeah, I'd probably start to worry about stuff like that.

    Comment


      #3
      I get what you're saying but it's not much of an answer. It's very easy to use that argument as an excuse for shoddy code. A waste of resources is a waste of resources. How many games out there run badly with a low FPS because the developers assumed effectively unlimited resources 'because it's 2017' and so didn't bother to endeavour towards neat, efficient code?

      I'd still like an answer to the question even if just for academic purposes, but there's nothing anyone can say to convince me not to try to make my code as efficient as possible and 'not to worry about it', so I wanted to know if filtering break nodes is more efficient than not doing so.

      PS What data are you using as a basis for those statistics? I couldn't find any at all.

      Comment


        #4
        well, we can only assume what UE does in the background.

        But i can imagine that deselecting members in the break node is purely visual.

        Comment


          #5
          Originally posted by Bob3DGames View Post
          I get what you're saying but it's not much of an answer. It's very easy to use that argument as an excuse for shoddy code. A waste of resources is a waste of resources. How many games out there run badly with a low FPS because the developers assumed effectively unlimited resources 'because it's 2017' and so didn't bother to endeavour towards neat, efficient code?

          I'd still like an answer to the question even if just for academic purposes, but there's nothing anyone can say to convince me not to try to make my code as efficient as possible and 'not to worry about it', so I wanted to know if filtering break nodes is more efficient than not doing so.

          PS What data are you using as a basis for those statistics? I couldn't find any at all.
          Not many games are CPU limited unless you're doing heavy physx sims on the CPU. I can only think of a few genres that fall into the category of being CPU hogs and MMOs would probably be one of the biggest ones. Even with a heavy CPU game like WoW, with hundreds of players/animations around, it usually doesn't max out most CPUs and at most, the game will consume a couple gigs of ram. And that's with hundreds of skinned skeletal animations, all operating randomly at the control of the players, with many textures per character/gear/mount/pet/etc and probably thousands of CPU particles. Yeah, I know WoW isn't a super highdef example, but recently they have been adding in higher and higher texture/poly res and more particles.

          The point is, having an extra few megabytes of ram eaten up isn't the end of the world. Unless you've got some array that's like 100,000,000 entries long and you're somehow wasting 64 bytes per entry, you probably shouldn't worry about it. You'd probably be better off worrying about maximizing your texture bandwidth/streaming and worrying about how 30% of your average texture is unused wasted space; due to UV island placement and unwraps not filling the whole space.

          You could hard code in some c++ function that would analyze what parts of a struct you need and what parts to omit. The ironic part would be that it would probably cost you just as much cycle time as it would to run the unpinned blank data through.

          Comment


            #6
            You've completely ignored my argument.

            Comment


              #7
              Originally posted by Bob3DGames View Post
              You've completely ignored my argument.
              Oh no, I completely get your argument. My point is that there are certain levels of lines in the sand you have to draw; when it comes to optimization. Something that insanely low level, like a struct variable passing information with some null entries in it, isn't going to cause any form of a problem in 99.9999% of cases. You should be far more worried about poorly optimized UIs, AI, physics and particles... If you really want to have control over all that super low level A+B=C stuff, then you'll probably need to rewrite the engine from scratch; to fit your expectations of optimization.

              Oh and I got those "statistics" from http://store.steampowered.com/hwsurvey/. Where you see it saying four physical CPUs, that usually means they have eight logical cores to them.

              Comment


                #8
                Originally posted by IronicParadox View Post
                Oh no, I completely get your argument. My point is that there are certain levels of lines in the sand you have to draw; when it comes to optimization. Something that insanely low level, like a struct variable passing information with some null entries in it, isn't going to cause any form of a problem in 99.9999% of cases. You should be far more worried about poorly optimized UIs, AI, physics and particles... If you really want to have control over all that super low level A+B=C stuff, then you'll probably need to rewrite the engine from scratch; to fit your expectations of optimization.

                Oh and I got those "statistics" from http://store.steampowered.com/hwsurvey/. Where you see it saying four physical CPUs, that usually means they have eight logical cores to them.
                Ah yes, I did see that, but it doesn't tell you how many users have a given number of logical cores as those survey results don't distinguish between CPUs with hyperthreading and those without. Four physical cores only gives you eight logical cores if the CPU has hyperthreading, like in an i7. An i5 won't have hyperthreading. Thus, that survey provides no way to tell how many people have 8 logical cores or whether or not that's typical. It's not right to assume that four-core CPUs are 'usually' hyperthreaded. The four-core CPU in my PC isn't.

                Comment


                  #9
                  Anyway, this is going off-topic now. I don't know why people on the internet do this. I asked a simple, yes-no question.

                  I'm going to assume it makes no difference, as per Raildex's suggestion. I'm done with this thread.

                  Comment


                    #10
                    Originally posted by Bob3DGames View Post
                    Ah yes, I did see that, but it doesn't tell you how many users have a given number of logical cores as those survey results don't distinguish between CPUs with hyperthreading and those without. Four physical cores only gives you eight logical cores if the CPU has hyperthreading, like in an i7. An i5 won't have hyperthreading. Thus, that survey provides no way to tell how many people have 8 logical cores or whether or not that's typical. It's not right to assume that four-core CPUs are 'usually' hyperthreaded. The four-core CPU in my PC isn't.
                    Actually, yes it is logical to assume they have hyper threading... i3s, i5s and i7s all have HT(if they were made in like the past 7 or so years), and AMD uses a similar setup of 1PC=>2LC. If you click on each item in that list, it will give you a break down. Steam has millions upon millions of samples. They're pretty much the most reliable source of PC gaming hardware statistics.

                    The way you find out how many logical cores you have, on Windows 10, is simply open your task manager>performance>cpu and you'll see where it says cores and logical processors.


                    Originally posted by Bob3DGames View Post
                    Anyway, this is going off-topic now. I don't know why people on the internet do this. I asked a simple, yes-no question.

                    I'm going to assume it makes no difference, as per Raildex's suggestion. I'm done with this thread.
                    This hasn't gone off topic at all. You spoke of several things, including efficiency and how you wanted to know if the unused pins on a struct were wasting performance. I told you there are things that are thousands to millions of times more performance intensive to worry about; regardless of whether or not the unused struct pins waste theoretical resources. I also explained that it would probably net even, in terms of calculation cycles, to filter out unused pins because you'd need a loop to filter through them and that has a cycle cost to it.

                    You received an answer that you didn't want to hear and are now saying it's off topic. There is this thing called answerhub and you can go there if you want your binary yes/no questions answered. People usually come to the forums to actually discuss things; not use people like tools.

                    Comment


                      #11
                      You need to actually go and look at those processors if you think they all have HT, the one of many most people are pointed towards doesn't. There's something worse so don't worry about it isn't an answer either.

                      If you wanted to see if there was any difference in terms of code you could look at what the nativization dumps out with either method.

                      Comment


                        #12
                        Oh correction: I looked it up and i3s have HT, i7s have HT and I guess i5s don't. So the i3s run with 2 cores/4 threads, i5s run at 4 cores/4 threads and i7s run 4 cores/8 threads. For some reason I was thinking the i5s were 3 core/6 threads. I might have been thinking of an AMD processor. Either way, 4 threads or 8 threads, having unused pins pushing null data isn't going to hinder either setup; under 99.999% of normal circumstances.

                        And I don't think that the nativized code will show it because it will just push information along to the actual engine and from there, the engine will decide what to do with it. You'd have to look through the source code and find the parts that define how the structs work. Then you'd have to follow the bread crumb trail to see how the engine handles variable reading and memory management. From there you'd probably be able to see how it handles null variable pins.

                        Comment

                        Working...
                        X