• Home
  • Raw
  • Download

Lines Matching full:code

2 NAND Error-correction Code
9 I felt there was room for optimisation. I bashed the code for a few hours
10 performing tricks like table lookup removing superfluous code etc.
26 This is done by means of a Hamming code. I'll try to explain it in
174 Therefore without implementing this it was clear that the code above was
212 void ecc1(const unsigned char *buf, unsigned char *code)
240 code[0] =
249 code[1] =
258 code[2] =
265 code[0] = ~code[0];
266 code[1] = ~code[1];
267 code[2] = ~code[2];
282 The code works, but is not terribly efficient. On my system it took
283 almost 4 times as much time as the linux driver code. But hey, if it was
292 to write our code in such a way that we process data in 32 bit chunks.
306 Anyway, if there is an issue: this code is developed on x86 (to be
323 void ecc2(const unsigned char *buf, unsigned char *code)
350 we need to adapt the code generation for the fact that rp vars are now
374 code[0] =
383 code[1] =
392 code[2] =
399 code[0] = ~code[0];
400 code[1] = ~code[1];
401 code[2] = ~code[2];
413 The code (of course) works, and hurray: we are a little bit faster than
414 the linux driver code (about 15%). But wait, don't cheer too quickly.
458 And after that the code takes about 30% more time, although the number of
459 statements is reduced. This is also reflected in the assembly code.
468 executing the code as my 3Ghz D920 processor.
471 different track: let's move back to the code from attempt2 and do some
480 For 4 the code starts with::
527 Of course after the loop we need to correct things by adding code like::
540 of the processor time compared to the current code in the linux kernel.
550 THe code within the for loop was changed to::
593 Measuring this code again showed big gain. When executing the original
594 linux code 1 million times, this took about 1 second on my system.
623 The new code now looks like::
681 Although it seems that the code within the loop cannot be optimised
689 code[0] |= (code[0] << 1);
697 Changed the code but again this slightly degrades performance. Tried all
714 iterations using the linux driver code takes between 13 and 13.5
715 seconds, whereas my code now takes about 0.73 seconds for those 10
728 but I also peeked at the existing code.
733 error in the given ecc code.
739 Code size increased from 330 bytes to 686 bytes for this function.