Author: Dann Corbit
Date: 15:55:12 02/21/03
Go up one level in this thread
On February 21, 2003 at 17:24:00, Dezhi Zhao wrote: >On February 21, 2003 at 16:54:05, Dann Corbit wrote: > >>On February 21, 2003 at 10:56:50, Dezhi Zhao wrote: >> >>>On February 21, 2003 at 00:33:33, Eugene Nalimov wrote: >>> >>>>I believe you can slightly speedup the loop without unrolling the loop or >>>>changing the algorithm -- actually code size would be exactly the same: >>>> >>>> mov BL,1 // work variable >>>> mov EDX,... // pointer to move list table >>>> mov ESI,-1 // pointer to highest value >>>> jmp loop >>>> >>>>better: >>>> mov BL,CL // value=move_value[x] >>>> mov ESI,EDX // y=x >>>> >>>>loop: mov CL,move_value[EDX] // CL = move_value[x] >>>> inc EDX // x++ >>>> >>>> cmp CL,BL // if (move_value[x] <= value) >>>> jbe loop >>>> >>>> cmp CL,0FFh // if (move_value[x]==255) >>>> jne better >>>> >>>>Thanks, >>>>Eugene >>>> >>> >>>inc edx should be replaced by add edx, 1 >>>inc is slow on P4. >> >> > ><snip> > >>We find the Table C-7 IA-32 General Purpose Instructions >> >>which contains the following timings: >> >>Instruction Latency1 Throughput Execution Unit2 >>ADC/SBB reg, imm 6 2 ALU >>DEC/INC 1 0.5 ALU > >I think you put a wrong comparision here. From the same document, you will find: > >Instruction Latency1 Throughput Execution Unit2 >DEC/INC 1 0.5 ALU >ADD/SUB 0.5 0.5 ALU Oops. How was that for a long-winded myopic answer? :-(
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.