ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro-Multicore/perlmulticore.h
(Generate patch)

Comparing Coro-Multicore/perlmulticore.h (file contents):
Revision 1.3 by root, Sat Jun 27 19:38:59 2015 UTC vs.
Revision 1.4 by root, Sat Jun 27 19:47:45 2015 UTC

255first are two memory accesses and a predictable function call of an empty 255first are two memory accesses and a predictable function call of an empty
256function. 256function.
257 257
258Of course, the overhead is much higher when these functions actually 258Of course, the overhead is much higher when these functions actually
259implement anything useful, but you always get what you pay for. 259implement anything useful, but you always get what you pay for.
260
261With L<Coro::Multicore>, every release/acquire involves two pthread
262switches, two coro thread switches, a bunch of syscalls, and sometimes
263interacting with the event loop.
264
265A dedicated thread pool such as the one L<IO::AIO> uses could reduce
266these overheads, and would also reduce the dependencies (L<AnyEvent> is a
267smaller and more portable dependency than L<Coro>), but it would require a
268lot more work on the side of the module author wanting to support it than
269this solution.
260 270
261=item Low Code and Data Size Overhead 271=item Low Code and Data Size Overhead
262 272
263On a 64 bit system, F<perlmulticore.h> uses exactly C<8> octets (one 273On a 64 bit system, F<perlmulticore.h> uses exactly C<8> octets (one
264pointer) of your data segment, to store the C<perl_multicore_api> 274pointer) of your data segment, to store the C<perl_multicore_api>

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines