| ??? 05/22/02 19:26 Read: times |
#23275 - RE: circular buffers by pointers or index ? |
Or, in 'C', buffer[idx++] = SBUF; idx &= RINGBUFMASK; In 'C', arrays & pointers are very closely related - so the use of one doesn't necessarily preclude the use of the other. Note that there is quite a widespread belief that pointers are inherently faster than indices; this is not necessarily so; eg, see: http://www.keil.com/discuss/docs/thread1156.htm |



