Lines Matching refs:code
5 I felt there was room for optimisation. I bashed the code for a few hours
6 performing tricks like table lookup removing superfluous code etc.
22 This is done by means of a Hamming code. I'll try to explain it in
153 Therefore without implementing this it was clear that the code above was
189 void ecc1(const unsigned char *buf, unsigned char *code)
217 code[0] =
226 code[1] =
235 code[2] =
242 code[0] = ~code[0];
243 code[1] = ~code[1];
244 code[2] = ~code[2];
259 The code works, but is not terribly efficient. On my system it took
260 almost 4 times as much time as the linux driver code. But hey, if it was
269 to write our code in such a way that we process data in 32 bit chunks.
283 Anyway, if there is an issue: this code is developed on x86 (to be
298 void ecc2(const unsigned char *buf, unsigned char *code)
325 we need to adapt the code generation for the fact that rp vars are now
349 code[0] =
358 code[1] =
367 code[2] =
374 code[0] = ~code[0];
375 code[1] = ~code[1];
376 code[2] = ~code[2];
388 The code (of course) works, and hurray: we are a little bit faster than
389 the linux driver code (about 15%). But wait, don't cheer too quickly.
429 And after that the code takes about 30% more time, although the number of
430 statements is reduced. This is also reflected in the assembly code.
439 executing the code as my 3Ghz D920 processor.
442 different track: let's move back to the code from attempt2 and do some
451 For 4 the code starts with:
495 Of course after the loop we need to correct things by adding code like:
506 of the processor time compared to the current code in the linux kernel.
516 THe code within the for loop was changed to:
559 Measuring this code again showed big gain. When executing the original
560 linux code 1 million times, this took about 1 second on my system.
585 The new code now looks like:
643 Although it seems that the code within the loop cannot be optimised
649 code[0] |= (code[0] << 1);
656 Changed the code but again this slightly degrades performance. Tried all
671 iterations using the linux driver code takes between 13 and 13.5
672 seconds, whereas my code now takes about 0.73 seconds for those 10
685 but I also peeked at the existing code.
689 error in the given ecc code.