lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Sat, Mar 17, 2012 at 3:59 AM, Gaspard Bucher <gaspard@teti.ch> wrote:
> On Sat, Mar 17, 2012 at 9:41 AM, Ross Bencina <rossb-lists@audiomulch.com>
>> On 17/03/2012 7:11 PM, Gaspard Bucher wrote:
>>> https://github.com/lubyk/lubyk/blob/master/modules/lk/include/lubyk/Fifo.h

Its not clear why you are going through the trouble of not passing
your data through the pipe.

Since a pipe has FIFO semantics, and you have small amount of data,
couldn't you just write/read the entire packed data through the pipe,
instead of just a notification byte? Are you not doing this because
you benchmarked performance, and found it to be a bottleneck?

You're already suffering context switching overhead, the memory copy
path through the kernel might not be much worse than the user-space
memory copying you are doing.

Cheers,
Sam