News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Branch Misprediction

Started by aw27, November 09, 2018, 08:55:52 PM

Previous topic - Next topic

Siekmanski

Quote from: AW on November 10, 2018, 03:36:23 AM
I usually follow the RDTSC route, today I followed the method inherited from the other thread which has also some advantages, in my opinion.
:t

The timers are not to calculate routine execution times.
These timers are meant to run simultaneous in realtime to control multimedia events in games or demos.

for example:

- timer 1 controls the time to switch to the next scene.
- timer 2 controls when a flock of birds fly over.
- timer 3 controls the duration of a bullet salvo.
- timer 4 controls when an UFO enters the earth orbit.

etc.
Creative coders use backward thinking techniques as a strategy.

LordAdef

Hi jose, Thanks for carrying the tourch!
Unpredictable Branching Performance Test using xorshift32 begins:

Test A (Branching):  1452.756573     esi: 100007857

Test B (No Branching/Using SETCC):  679.610210     esi: 99997780

Test C (No Branching/Using CMOV):  588.437494     esi: 100011413

Press any key to continue ...

daydreamer

Quote from: Siekmanski on November 10, 2018, 05:13:53 AM

The timers are not to calculate routine execution times.
These timers are meant to run simultaneous in realtime to control multimedia events in games or demos.

for example:

- timer 1 controls the time to switch to the next scene.
- timer 2 controls when a flock of birds fly over.
- timer 3 controls the duration of a bullet salvo.
- timer 4 controls when an UFO enters the earth orbit.

etc.
I look forward to test timers for synchronize several threads working together
LOCK prefix maybe needs to be used?
rdrand vs simplest randomgenerator used in perlin noise would be interesting to test against each other
I think we should add D nobranch test:SIMD comparisions so we know how much worth the time spending on getting nonbranch code right and how much gain/loss?
my none asm creations
https://masm32.com/board/index.php?topic=6937.msg74303#msg74303
I am an Invoker
"An Invoker is a mage who specializes in the manipulation of raw and elemental energies."
Like SIMD coding