Herbert's XOR (done with praying yet?)
From: wolfgang kern (nowhere_at_nevernet.at)
Date: 01/29/05
- Next message: wolfgang kern: "Re: Herbert's XOR (done with praying yet?)"
- Previous message: The /\\\\o//\\annabee: "Re: this is the time to pray"
- Next in thread: wolfgang kern: "Re: Herbert's XOR (done with praying yet?)"
- Reply: wolfgang kern: "Re: Herbert's XOR (done with praying yet?)"
- Reply: Evenbit: "Re: Herbert's XOR (done with praying yet?)"
- Reply: The /\\\\o//\\annabee: "Re: Herbert's XOR (done with praying yet?)"
- Reply: Phil Carmody: "Re: Herbert's XOR (done with praying yet?)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 29 Jan 2005 15:47:24 +0100
Sorry for the new topic, I cannot reply to threads 'that' long.
"The Half" skrev:
| Okye. Assuming nothing I test again, during a more relaxed stage of the
| app :
| 3 seperate tests
|
| example 1 clocks in at 027, 027, 26 ....ect
| example 2 clocks in at 0113, 1d, D6 ....etc
| example 3 clocks in at 013, 013, 013 ...etc
|
| Seems to me Betov still have the final word on assembly.
| All this is simply nonsense.
|
|
| Code used :
|
| [test1:0 Test2:0 Test3: 0]
| TestProc:
| rdtsc | push eax edx
|
| mov eax a ;5 bytes
| not D$eax | add eax 4 | ;5 bytes
| not D$eax | add eax 4 | ;5 bytes
| not D$eax ;2 bytes
|
| rdtsc | pop ecx ebx
| sub eax ebx
| mov D$test1 eax
|
| rdtsc | push eax edx
|
| mov eax a
| not D$eax | add eax 4 |
| not D$eax | add eax 4 |
| neg D$eax | dec D$eax
|
| rdtsc | pop ecx ebx
| sub eax ebx
| mov D$test2 eax
|
|
| rdtsc | push eax edx
|
| not D$a | not D$a | not D$a ;18 bytes
|
| rdtsc | pop ecx ebx
| sub eax ebx
| mov D$test3 eax
| int 3
|
| ret
| --
| http://www.TheWannabee.org
How about:
[test1:0 Test2:0 Test3: 0]
TestProc:
rdtsc |push eax |push edx
mov eax test1 ;5 bytes
XOR D$eax 0-1 ;3 bytes
XOR D$eax+4 0-1 ;4 bytes
XOR D$eax+8 0-1 ;4 bytes
rdtsc
sub eax D$esp+4
sbb edx D$esp
int3 ;16 bytes, ~13 cycles (+11 for one rdtsc)
add esp +8
ret
I think Herbert meant the logical construction of an (inverting)
XOR-function with only two NOT and just using OR and AND:
not
|\ ___ A B XOR
A O-o--| x--| \ ___
| |/ |and|----\ \ 0 0 0
B O-|-o-----|___/ |or|---O XOR 0 1 1
| | ___ ,-/___/ 1 0 1
'-|-----| \ | 1 1 0
| |\ |and|--'
'-| x-|___/
|/
not
__
wolfgang
- Next message: wolfgang kern: "Re: Herbert's XOR (done with praying yet?)"
- Previous message: The /\\\\o//\\annabee: "Re: this is the time to pray"
- Next in thread: wolfgang kern: "Re: Herbert's XOR (done with praying yet?)"
- Reply: wolfgang kern: "Re: Herbert's XOR (done with praying yet?)"
- Reply: Evenbit: "Re: Herbert's XOR (done with praying yet?)"
- Reply: The /\\\\o//\\annabee: "Re: Herbert's XOR (done with praying yet?)"
- Reply: Phil Carmody: "Re: Herbert's XOR (done with praying yet?)"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|