Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

202 Neutral

About SnotBob

  • Rank
  1. SnotBob

    Wasting ammo on reload

    In Ghost Recon the player has a number of clips and R-key loads the clip with the largest amount of ammo in it. Ultimately the choice depends on desired degree of realism. In my opinion Ghost Recon (the first game in the series) nails it on all aspects by being as realistic as possible without hampering game play.
  2. SnotBob


    Quote:Original post by Hnefi Quote:Original post by Aldacron When writing Java microbenchmarks, it's very easy to measure the wrong thing. People always overlook the fact that run time optimization and compilation do not kick in on a block of code until it has been executed several times. Naive benchmarks often wind up measuring the speed of the JVM's warm up phase, or it's interpreter, or the code analysis phase, rather than the actual algorithm they are benchmarking. But why would you not want to factor those things into the benchmark? The moment the program starts executing, the measurement should start. I mean, it wouldn't be fair if we somehow managed to ignore the time for heap allocations in C++, so how is it fair to ignore the cost of JIT? Because in a longer running application all the important functions are compiled relatively early. The C++ heap remains a problem throughout the running time. BTW, as I ran the above benchmarks, I tried switching the JVM to compile right away. Didn't have much impact, which is not surprising because the default is to compile a function once it's run for the 1500 time.
  3. SnotBob

    Terror Cell Broken Up In Pennsylvania

    Here's also the piece I read: More than 90% of weapons used by the cartels originate in the US and there is evidence US citizens are joining the gangs to act as hitmen and women.
  4. SnotBob


    Quote:Original post by Antheus What happens with smaller/bigger N? Is the difference constant? Or is it affected by O(n)? 16% constant factor is a non-issue, since choice of other sorting algorithm can change that up to 100000%. I didn't test with other Ns, but since the implementations are identical and the running time per sort is pretty large (over 2000 ms on my laptop), I'd estimate that any constant overhead is negligible and the running time is determined entirely by the efficiency of the elementary operations in the quicksort routine. That's why I was surprised that the difference was as large as 16 %. I'd really like to see the machine code JVM generates. (One possible gotcha is that the benchmark prints out the median running time of 10 runs, it would be best to look at the fastest times. Another remote possibility is that System.out.print() or System.nanoTime() somehow trash the cache.)
  5. SnotBob

    Why do we need semicolons?

    Quote:Original post by Hk If you want to be precise, you have to talk about *sequence points* (thats at least what the C-Standard calls them). No, that's conceptually different from parser symbols that terminate statement. The semicolon is purely for the convenience of the parser. Typically there would be a sequence point between two statements, but by the point the compiler considers such things the parser has already parsed the statements. Syntax of Lua is such that there is no need for special statement terminating symbols. A notable difference (IIRC) is that the assignment in Lua is a statement, where it's an expression in C/C++/Java/etc, so it's very easy for the parser in Lua to know that a = b c = d are two separate statements.
  6. SnotBob


    Quote:Original post by DevFred Quote:Original post by SnotBob I was rather surprised by this difference. Did you expect more or less? I was actually quite surprised Java performed so well. I was surprised that Java didn't do better. Of course, having to analyse Java byte code to reconstruct the program in an IL more amenable to optimization is costly and compilation has to happen at runtime, so they may not employ every optimization they otherwise could. (Or the bounds check elimination isn't as clever as I'd thought.)
  7. SnotBob

    Future desktops

    Quote:Original post by Talroth Wait, so people think that having to connect to the internet and download your word processor each and every time you want to write up a label or address an envelope is a good idea? I think that the idea of thin clients is pretty much dead and buried. There's just no reason not to put a hard drive into one. The amount of time and network bandwidth you save by having a hard drive makes it well worth the price. In same vein there's really no reason not to put in enough RAM and a decent CPU and maybe a GPU. I believe the current idea is to use the web browser as an easy to install platform, since software installation happens by the browser downloading and caching all the new code and data since last change. Makes upgrading hassle free too. The software provider can easily pull the plug on a client as well, without having to worry about unlicensed software laying around. So licensing gets easier, at least for the provider.
  8. SnotBob


    Quote:Original post by DevFred I will. I just wrote a single benchmark where C++ outperforms Java. I was rather surprised by this difference. I figured it might be because of bounds checking, but putting these lines in there hardly made any difference to running times: // Java: if (a < 0 || b <0 || a>=n.length || b>=n.length) throw new IndexOutOfBoundsException(); // C++: void quicksort(int *n, int nsize, int a, int b) { if (a < 0 || b <0 || a>=nsize || b>=nsize) throw "Bail out"; I don't know what kind of bounds check elimination Sun's JIT uses, but having that on the first line of quicksort() should make it almost trivial to prove that all of the bounds checks will succeed. BTW, tweaking with the JVM options made some difference. Particularly the -server option shaved 5% off.
  9. SnotBob

    Future desktops

    There are obvious benefits to browser based applications in many business applications. I don't think that the technology is quite mature yet. Lot of basic functionality that's immediately available to developers on conventional platforms needs to be hacked into javascript/HTML (if at all possible), take for example the GWT rich text editor. It's notable that Google Docs doesn't come close to main stream office suites in terms of functionality. None of this will have much impact to games. For one, games often need a lot of content, many gigabytes, so they need to be locally installed. Services like Steam are probably the closes thing to SAAS in games, outside of actual browser-based games.
  10. SnotBob

    Terror Cell Broken Up In Pennsylvania

    Quote:Original post by curtmax_0 Almost all of the 'machine guns' used by criminals are smuggled into the country and never go through any legal channels. That's funny, because I just read that Mexican drug gangs use weapons legally bought and smuggled from USA.
  11. SnotBob

    climate change idea

    Quote:Original post by Kaze If I remember correctly the low and intermediate level nuclear waste your link talks about is stuff like lab coats and tools contaminated by radiation and not actual waste from nuclear power plants. No, the plan is to deposit nuclear waste from power plants into tunnels caved in bedrock. It's true that the waste straight from the reactor is quite active, but I believe they let it cool down for a few years.
  12. SnotBob

    climate change idea

    Nuclear waste wouldn't be much of a problem, if things were handled reasonably. The radioactivity of waste is not significantly greater that that of the fuel, so simply dispersing it into the ground wouldn't be all that bad. The final disposal plan in Finland is exemplary. As I see it, the major problem is ignorance. There are plenty of people who think that radioactivity is something man made and that Earth is not radioactive at all. (However, I've yet to be confirmed that nuclear energy is economically more viable than solar energy.)
  13. SnotBob

    C++ iterator vs []

    Quote:Original post by chairthrower Quote:No. It would require rather complicated analysis from the compiler to be able to switch between the [] operator and iterators automagically. It's safe to assume that no C++ compiler does anything like this. most compilers do induction variable analysis which will transform data accesses in loops from indexing offset operations to straight dereferencing and in the process free up a register. its highly likely this would be done under the covers for operator [] applied to stl sequence types if the compiler judged the resulting code was more performant. Right, but this is at a much lower level than what Spoonbender indicated and doesn't apply generally to cases where you choose between operator[] and begin(),end().
  14. SnotBob

    C++ iterator vs []

    Quote:Original post by rip-off Quote: And doesn't MSVC omit bounds checking on [] in release mode? Not the newest version. I wonder what reasoning MS had behind that decision? Last I checked, bounds checking was pretty expensive to do on every access. Maybe they consider C++ to be legacy and want to 'fix' it, 'til people switch over to C#.
  15. SnotBob

    Why are men supposed to approach women?

    Quote:Original post by niner Quote:Original post by Sneftel I have absolutely no idea why you can't get a date. Dude, you're totally missing the point.. all animals act like that!!!! The male always approaches the female, it's a part of the nature. B.S.! Skipped on your biology class, did you? Humans are pretty balanced when it comes to how advances who. Mostly it seems to be a cultural thing. From personal experience, the best sex I've had was with women who came on to me. Also, it's not always so obvious. Women and men have different cues. If you can't read the opposite sex, you're out of luck.
  • Advertisement

Important Information

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

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!