Re: [LAD] a *simple* ring buffer, comments pls?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Linux Audio Developers <linux-audio-dev@...>
Date: Friday, July 8, 2011 - 12:21 pm

On 8 July 2011 12:24, James Morris wrote:

> So I'd thought I'd compare the execution time of 7000 items passing

MSG_BUF_SIZE = 32,
MSG_COUNT = 700000

JACK RING BUF:
[sirrom@scrapyard msg_test]$ time ./msg_test
msg_test.c: 164 main(): read
back loop count:700032

real 0m0.136s
user 0m0.260s
sys 0m0.003s
[sirrom@scrapyard msg_test]$ time ./msg_test
msg_test.c: 164 main(): read
back loop count:700032

real 0m0.136s
user 0m0.263s
sys 0m0.000s
[sirrom@scrapyard msg_test]$ time ./msg_test
msg_test.c: 164 main(): read
back loop count:700032

real 0m0.142s
user 0m0.273s
sys 0m0.003s

MY RING BUF WITH ATOMIC POINTERS

[sirrom@scrapyard msg_test]$ time ./msg_test
msg_test.c: 286 main(): read
back loop count:702657

real 0m0.169s
user 0m0.330s
sys 0m0.000s
[sirrom@scrapyard msg_test]$ time ./msg_test
msg_test.c: 286 main(): read
back loop count:738329

real 0m0.173s
user 0m0.337s
sys 0m0.000s
[sirrom@scrapyard msg_test]$ time ./msg_test
msg_test.c: 286 main(): read
back loop count:753976

real 0m0.171s
user 0m0.333s
sys 0m0.000s

A very simple data integrity check was used, (note: pointers to data
were stored in the rbufs rather than data), the main thread set the
items data to point to the item itself. the integrity check was that
it should come back intact, still pointing to itself. success in both
instances.

JACK's ringbuf, as most will have undoubtedly known all along, is
faster, and the test code required 50000 iterations less than when
using my ring buf. maybe somewhere, the atomics are required?
james.
_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@lists.linuxaudio.org
http://lists.linuxaudio.org/listinfo/linux-audio-dev

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] a *simple* ring buffer, comments pls?, James Morris, (Thu Jul 7, 12:10 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, James Morris, (Fri Jul 8, 12:51 am)
Re: [LAD] a *simple* ring buffer, comments pls?, James Morris, (Fri Jul 8, 11:24 am)
Re: [LAD] a *simple* ring buffer, comments pls?, Paul Davis, (Fri Jul 8, 1:22 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Fons Adriaensen, (Fri Jul 8, 5:17 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Gabriel M. Beddingfield, (Fri Jul 8, 6:12 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Arnold Krille, (Fri Jul 8, 7:06 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Fons Adriaensen, (Fri Jul 8, 7:53 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Paul Davis, (Fri Jul 8, 8:41 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Fons Adriaensen, (Fri Jul 8, 9:01 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Arnold Krille, (Fri Jul 8, 8:59 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Fons Adriaensen, (Fri Jul 8, 9:11 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Muresan, (Fri Jul 8, 7:23 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Muresan, (Mon Jul 11, 6:59 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Fons Adriaensen, (Mon Jul 11, 8:53 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Muresan, (Tue Jul 12, 5:41 am)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Kegel, (Fri Jul 8, 7:29 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Paul Davis, (Fri Jul 8, 8:49 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Sean Bolton, (Fri Jul 8, 9:57 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Muresan, (Fri Jul 8, 11:03 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Fons Adriaensen, (Fri Jul 8, 11:27 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Muresan, (Sat Jul 9, 1:25 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Fons Adriaensen, (Sat Jul 9, 2:38 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Muresan, (Sun Jul 10, 3:05 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Fons Adriaensen, (Sun Jul 10, 9:15 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Muresan, (Mon Jul 11, 12:03 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Fons Adriaensen, (Mon Jul 11, 8:44 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Kegel, (Sun Jul 10, 10:34 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Paul Davis, (Sun Jul 10, 9:41 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Sean Bolton, (Mon Jul 11, 1:34 am)
Re: [LAD] a *simple* ring buffer, comments pls?, Sean Bolton, (Mon Jul 11, 1:44 am)
Re: [LAD] a *simple* ring buffer, comments pls?, Olivier Guilyardi, (Mon Jul 11, 7:19 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, James Morris, (Mon Jul 11, 8:32 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Chris Cannam, (Mon Jul 11, 8:50 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Tim E. Real, (Mon Jul 11, 9:38 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Robin Gareus, (Mon Jul 11, 10:27 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Arnold Krille, (Mon Jul 11, 10:12 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Robin Gareus, (Mon Jul 11, 10:28 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Paul Davis, (Mon Jul 11, 10:34 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Mills, (Mon Jul 11, 10:24 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Fons Adriaensen, (Mon Jul 11, 10:06 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Olivier Guilyardi, (Mon Jul 11, 11:06 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Muresan, (Mon Jul 11, 10:17 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Paul Davis, (Mon Jul 11, 8:58 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Chris Cannam, (Tue Jul 12, 7:07 am)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Muresan, (Tue Jul 12, 12:44 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Kai Vehmanen, (Wed Jul 20, 9:25 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Emanuel Rumpf, (Sat Aug 20, 6:24 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Emanuel Rumpf, (Sat Aug 27, 7:21 am)
Re: [LAD] a *simple* ring buffer, comments pls?, Gabriel Beddingfield, (Sat Aug 20, 7:16 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Chris Cannam, (Tue Jul 12, 7:46 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Olivier Guilyardi, (Tue Jul 12, 8:20 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Arnold Krille, (Tue Jul 12, 11:31 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Paul Davis, (Tue Jul 12, 11:56 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Olivier Guilyardi, (Wed Jul 13, 12:27 am)
Re: [LAD] a *simple* ring buffer, comments pls?, Chris Cannam, (Tue Jul 12, 9:07 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Olivier Guilyardi, (Tue Jul 12, 9:26 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Paul Davis, (Tue Jul 12, 8:36 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Olivier Guilyardi, (Tue Jul 12, 9:32 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Kegel, (Tue Jul 12, 10:23 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Olivier Guilyardi, (Tue Jul 12, 11:50 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Fred Gleason, (Wed Jul 13, 12:08 am)
Re: [LAD] a *simple* ring buffer, comments pls?, Olivier Guilyardi, (Wed Jul 13, 12:25 am)
Re: [LAD] a *simple* ring buffer, comments pls?, Chris Cannam, (Tue Jul 12, 9:37 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Olivier Guilyardi, (Tue Jul 12, 10:00 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Chris Cannam, (Tue Jul 12, 9:16 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Emanuel Rumpf, (Tue Jul 12, 5:20 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Chris Cannam, (Mon Jul 11, 8:50 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, David Olofson, (Mon Jul 11, 8:47 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Dan Kegel, (Fri Jul 8, 9:52 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Fons Adriaensen, (Fri Jul 8, 6:39 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, James Morris, (Fri Jul 8, 12:21 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Olivier Guilyardi, (Fri Jul 8, 12:56 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, Gabriel M. Beddingfield, (Fri Jul 8, 1:04 am)
Re: [LAD] a *simple* ring buffer, comments pls?, David Robillard, (Fri Jul 8, 2:23 pm)
Re: [LAD] a *simple* ring buffer, comments pls?, James Morris, (Fri Jul 8, 8:45 am)
Re: [LAD] a *simple* ring buffer, comments pls?, James Morris, (Fri Jul 8, 8:40 am)