Jump to content

glacierre

Members
  • Posts

    50
  • Joined

  • Last visited

Reputation

16 Good

Profile Information

  • About me
    Spacecraft Engineer
  1. http://graphics.stanford.edu/~seander/bithacks.html#BitReverseObvious
  2. Well if you are going to write it 20 times just #define A 65 and skip the quotation marks, even cleaner.
  3. It is nearly always good to pack things inside a function, but those examples were snippets that you can drop anywhere. But, talking about performance critical code, I had once a simulation where I dropped >70% runtime by doing parameter check before (outside) my refresh function. Construction of the stack frame for the function was a waste of cycles if often it exited straight away because the set of parameters did not trigger the full refresh procedure. So by all means, keep it tidy, but you may have to make it messy later on. On the example of the A B C D E operations, another optimization is running the code with example data and based on number of calls placing the most common case first, to bypass 'ifs' often.
  4. I do not understand the aims of the author (PB666) of the original post. Seems like you have a project and want to learn about half a dozen languages to finish it. Meanwhile, it also seems that you want to optimize math operations on you own, which almost nobody does (for good reasons) using languages that you just learned (terrible idea if I ever heard one). So the first thing to learn is: 'Premature optimization is the root of all evil'. Pick one language and implement what you need. If the stuff is complex do yourself a favor and pick a comfortable language (C#, Python). Then run it. If it turns that performance is good you are done. If not, _profile_ it and attack the slowest part. I can tell you beforehand that the slowest part is not going to be calculating square roots, which is good because there is very, very little to gain there. Then go on and learn how to make that piece that is slow better. Maybe you will be able to do so still within your language of choice, maybe you will need pure C. But you will be coding something like 100 lines of C tops. Nowadays you can push pieces of for example python code to speeds equal or even faster than C if you need to, often without writing a line of C. You just need to find which pieces.
  5. Actually, many cheap transformers buzz in barely audible frequency, and defective transformers are probably the main source of EM radiation in a household. Infrasound, by the way, has some well documented psychological / somatic effects.
  6. Half of the times I try to open a thread I get a 502
  7. Put it in a time machine and set the dial to year 2000. With a note "Dear ancestors, we think this is yours. BTW we found the solution for this stuff... Enjoy"
  8. I find the attitude of "I don't know how to solve this problem that I am creating, but instead of stopping to make more trouble, I will kick it to the future and let them deal with it" completely short sighted and appalling. Moreover, "we probably" and "we will" are not synonyms. NOOOPE. This does nothing to prevent a cheap, easy and "extra nasty" (thanks to your idea) dirty bomb. You just need to get the stuff, grind it in fine dust, load it in a bucket and use conventional explosives. Crazy people and terrorists do not need to know nuclear physics to completely disrupt life in an average sized city, just basic pyrotechnics is more than enough. About this topic, I found this documentary very, very good http://www.imdb.com/title/tt1194612/ We should all keep in mind the "quality" of the buildings executed by government contractors in the last century and wonder how realistic is to expect the lowest bidder to build something for the next 10.000 years.
  9. Talking about combat, space and not totally sucking physics: Freelancer http://en.wikipedia.org/wiki/Freelancer_%28video_game%29 was a decent one, you would keep your momentum unless you applied acceleration in other direction. However, I cannot remember now if you could make orbits or it was all pure linear physics.
  10. I just installed this in 0.23 (modded with better than manned first) and the display values got stuck forever no matter if I start a new craft, go to vab/sph, even go out to main KSP menu and reload the saved game! I always get the same stages I had a while ago. May I suggest, until the bug gets finally solved, it would be good enough to show a button to manually force a refresh/reload of the KER? Restarting KSP is the only way to solve this right now and it is by far not a convenient workaround.
  11. The alpha concept is veeeery much abused in the late years (not talking specifically about KSP, a general trend). Besides, when people complains, some get shushed because "you already got your game, the devs do not owe you anything", but on the other hand, when somebody complains they get shushed because "you must understand it is still an alpha/beta". Well, it is one or the other, but not both. I am personally of the opinion that my money was 1.0, and that gives me some right to ask for more, not to get silenced with either lame excuse.
  12. The announcement of resources back in the day was the worst SQUAD could do for Kethane popularity. I am pretty sure now it will pick up. But I find this kind of communication behaviour a joke.
×
×
  • Create New...