News:

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

Main Menu

ArcSin timings

Started by jj2007, December 21, 2020, 11:16:57 AM

Previous topic - Next topic

daydreamer

Quote from: HSE on December 24, 2020, 04:07:18 AM
Quote from: jj2007 on December 24, 2020, 03:15:19 AM
I start wondering what is the motivation behind your critical comments, Héctor :badgrin:

Just beating what I can. It's the laboratory:
QuoteAlgorithm and code design research laboratory. This is the place to post assembler algorithms and code design for discussion, optimisation and any other improvements that can be made on it. Post code here to be beaten to death to make it better, smaller, faster or more powerful. Feel free to explain the optimisation methods used so that everyone can get a feel for the code design.

Tables are interesting tools, especially if you macro make so easy to create, but how to build it and when to use it deserve some considerations.
well if you use trigo later for drawing in this 64bit era,wouldnt fixed point table be faster alternative,even 32bit support MUL that results in 32bit in eax,32bit in edx?also DIV use both 32bit registers?
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

HSE

Quote from: daydreamer on December 24, 2020, 06:44:30 AM
well if you use trigo later for drawing in this 64bit era,wouldnt fixed point table be faster alternative,even 32bit support MUL that results in 32bit in eax,32bit in edx?also DIV use both 32bit registers?
You can timing that to be sure  :biggrin:
Equations in Assembly: SmplMath

daydreamer

Quote from: HSE on December 24, 2020, 07:08:13 AM
Quote from: daydreamer on December 24, 2020, 06:44:30 AM
well if you use trigo later for drawing in this 64bit era,wouldnt fixed point table be faster alternative,even 32bit support MUL that results in 32bit in eax,32bit in edx?also DIV use both 32bit registers?
You can timing that to be sure  :biggrin:
it's best to make optimisation and timings also in practical uses,whole tunnel(stargate),sphere(planet) code,float to int conversion take not only some cycles,mixing SSE floating point code and SSE 2 integer code you get some penalty
For example circle , can be from 32x32 sprite to  big hires 4k hd screen, 32 diameter* pi vs 1080 diameter * pi, so a general 360 degree LUT, works best for 360 pixel circle, too many for 32diameter and too few for 1080 diameter
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

quarantined

Quote from: quarantined on December 22, 2020, 04:40:57 AM

AMD A6-9220e RADEON R4, 5 COMPUTE CORES 2C+3G   (SSE4)
1.60 GHz

28377   cycles for 100 * Arcsinus
4369    cycles for 100 * ArcSin

28350   cycles for 100 * Arcsinus
4247    cycles for 100 * ArcSin

28358   cycles for 100 * Arcsinus
4414    cycles for 100 * ArcSin

28341   cycles for 100 * Arcsinus
4440    cycles for 100 * ArcSin

28374   cycles for 100 * Arcsinus
4300    cycles for 100 * ArcSin

58      bytes for Arcsinus
209     bytes for ArcSin

Real8   29.99999926061033761    Arcsinus
Real8   29.99999926061034117    ArcSin

Windows 7 Pro, 32 bit

from new computer, xp 32 bit  :biggrin:
Quote
Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz (SSE4)

17230   cycles for 100 * Arcsinus
2710    cycles for 100 * ArcSin

17212   cycles for 100 * Arcsinus
2726    cycles for 100 * ArcSin

17212   cycles for 100 * Arcsinus
2714    cycles for 100 * ArcSin

17219   cycles for 100 * Arcsinus
2710    cycles for 100 * ArcSin

17212   cycles for 100 * Arcsinus
2710    cycles for 100 * ArcSin

58      bytes for Arcsinus
209     bytes for ArcSin

Real8   29.99999926061033761    Arcsinus
Real8   29.99999926061034117    ArcSin

--- ok ---
[\quote]

W@hen I say 'new' its a misnomer. Its a refurished hp 8100 elite SFF box. For $130 USD, complete with monitor keyboard and mouse it's doing a terrific job so far. And drivers are still around for the good old XP.  :tongue: