Jump to content

  • Log In with Google      Sign In   
  • Create Account


cstony

Member Since 08 Mar 2007
Offline Last Active Today, 05:06 AM

Posts I've Made

In Topic: Cache coherence and containers

21 September 2014 - 12:14 PM

We still need more information about how you are using the map to give you a helpful answer.

 

Do you really need to put the pointers to the vector elements in the map? You are trying to setup the map so that you can iterate over to give the same sequence as the vector. In doing this, you propose to store a pointer to each element, this means that you need to do a pointer dereference for every element in the vector. Can you not simply iterate over the vector and then the map or vice versa? Can the elements in the map not be added to the vector?

 

You mention cache coherence so I'm assuming this is for performance purposes? Have you got a performance problem that needs resolving? Have you used a profiler to ensure you are 'optimising' the correct part of your program?


In Topic: c++ Performance boost needed

17 September 2014 - 03:03 PM

 

  1. Yes, operator[] is a little slower, especially if you have exceptions/etc turned on; it checks whether range is valid, etc. However your loop isn't big enough to make a any noticeable difference

 

 

operator[] does not does not do bounds checking on a std::vector, the at(size_t) member function does do bounds checking and will throw an out_of_range exception. As for it not being inlined. As for inlining as asked by OP, this would vary from compiler to compiler. operator[] is a trivial function and I doubt the fact it is in a loop would prevent it being inlined. You would have to check the assembly code.

 

Also it's worth repeating what has already been said, when you are really aiming for performance gains a good profiling tool is an absolute must!


In Topic: Hybrid ortho/perspective view frustum

23 December 2012 - 09:02 AM

Thanks Brother Bob, you're right. I was initially thinking that this would be possible to construct just by modifying the projection matrix. Doing the perspective divide in the vertex shader only on the x, z and w components did the trick! smile.png

In Topic: captcha bypass

06 September 2011 - 04:46 PM

Just some thoughts.
Edit: color blind co-worker says color based chaptcha replacements annoy him, just throwing that out there.


Yes, the last thing you need is a bot beating a human :P

In Topic: Legalizing my Game

31 August 2011 - 05:17 PM

I seriously got negged for that? Wow... someone needs to lighten up.

*preps for another neg on this post. weeeee*


OFF TOPIC How do you even give a neg vote now? I didn't think it was possible. I thought we adopted the 'like' culture.

ON TOPIC I'm not involved in your project and dont know the finer details. However, as an outsider, it feels like you are trying to screwing your colleagues over somewhat. It looks like you have outsourced the work you couldn't undertake yourself and now you want to reap the majority of the benefits and pass on as little as possible to the other contributers. I don't mean to sound like an ass but I think everyone should be fairly compensated. You don't mention any percentages so could I be completely off the mark but saying "I want to make sure that when I sell this game, all the profits will go to me, then I will pay my 'team' according to their effort" sounds like you will be taking the vast majority. I think you should show more respect to the rest of the team and hopefully you will work on more projects in the future :)

I must also add, congrats on taking a project this far though :)

PARTNERS