Comments by "OpenGL4ever" (@OpenGL4ever) on "Creel" channel.

  1. 3
  2. 2
  3. 2
  4. 2
  5. 1
  6. 1
  7. 1
  8. 1
  9. 1
  10. 1
  11. 1
  12. 1
  13. 1
  14. 1
  15. 1
  16. 1
  17. 1
  18. 1
  19. 1
  20. 1
  21. 1
  22. 1
  23. 1
  24. 1
  25. 1
  26. 1
  27.  @y2ksw1  "mov and nop can execute together, and inc on two different registers, too. If I would try to use mov and inc together, mov had to wait for inc to finish." That wasn't my point, my point was, that your inc still have to wait for the mov. Let's assume we have a CPU with two execution units A and B and thus is able to do 2 instructions per step. 1. Step A does "mov ebx, eax" B does "nop" 2. Step A does "inc eax" B does "inc ebx" ; here B does have to wait until A in Step 1 is finished. And now my version: 1. Step A does "inc eax" B unused or a nop 2. Step A does "mov ebx, eax" ; here A does have to to wait, until A in Step 1 is finished B unused or a nop So in all variants it's 2 steps. Where is your performance gain? As far as I know it's the other way around. The U-pipe can execute any instruction in the Intel architecture while the V-pipe can execute only simple instructions. Source: The Book "Computerarchitektur" from Andrew S. Tanenbaum and James Goodman, ISBN 3-8273-7016-7. (it's the German version, that's why the word Computer Architecture is written differently.) But I agree to use the correct pipe for the appropriate instruction and then order the instruction accordingly if the pipes are different. I also agree on the rest what you said and it might explain why your code is faster, but in that case only because by luck the right unit was fed with the right instructions. What happens if you put a NOP in the instruction chain of my code to explicitly make sure, that the instructions units are fed with the correct instructions they can understand? For if statements, it is best to use branchless programming techniques on modern CPUs whenever possible. High level language compilers will do this automatically and optimize the code for it in most cases, but not in all cases. But i assume you know that already.
    1
  28. 1
  29. 1
  30. 1
  31. 1
  32. 1
  33. 1
  34. 1
  35. 1
  36. 1
  37. 1
  38. 1
  39. 1
  40. 1
  41. 1
  42. 1
  43. 1
  44. 1
  45. 1
  46. 1
  47. 1
  48. 1
  49. 1
  50. 1