Hello there!
Quite different way to split any numbers of processes:
;redcode
;name SlowButSmallSpliter
;author Lukasz Adamowski
;assert 1
NumberOfProcesses EQU 2
count
jmn 0, #NumberOfProcesses
mov 1, split
dat 0, 0
start
spl count, <count
split
spl 0, <count
jmn 0, -1
; Start of proper warrior
end start
6 instructions only. Well, it's not efficient, however for 2 threads
runs in 10 cycles. The more porcesses you want to have the slower it
is. In real battle it is more important to be fast than to be small,
because code run once and than left in the core may be a decoy for
scanners, so I think you'd better avoid loops in your algorithm.
Warrior will get much longer, but will execute slight faster.
Greetings
Lukasz Adamowski
Dnia 7-12-2007 o godz. 19:00 Skybuck Flying napisal:
> Another interesting figure:
>
> 14 cycles for 2 threads, the minimum number of threads as the parameter.
>
> Still pretty nice.
>
> That's about 7 cycles per thread.
>
> Not too bad giving it's flexibility to spawn any number of threads
>
> Bye,
> Skybuck.
-= "Make tea, not war" =-
----------------------------------------------------
Płyta CD i kartka pocztowa "Pocztówka do Św.Mikołaja 2007" już
w sprzedaży. Kupując tę płytę pomagasz dzieciom
z domów dziecka.
wwW.pocztowkadoswietegomikolaja.pl
http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fpocztowka.h...&sid=12