5 ms·
How does this compare to libdispatch (https://libdispatch.macosforge.org/ https://libdispatch.macosforge.org/) in functionality and performance? I'm very intere
by IPGlider 13y ago
How does this compare to libdispatch (https://libdispatch.macosforge.org/ https://libdispatch.macosforge.org/) in functionality and performance? I'm very interested in this.
- wezfurlong 13y agoWe haven't looked at libdispatch specifically; would welcome your feedback on how we compare. We hope we do well here; we've had some nice results: https://github.com/facebook/libphenom/commit/c2753c2154a0cffc0bd70e8f28dd0ea884aab4fd https://github.com/facebook/libphenom/commit/c2753c2154a0cff...
- wezfurlong 13y agoThis is the test code referenced by that commit: https://github.com/facebook/libphenom/blob/master/tests/tpool.c https://github.com/facebook/libphenom/blob/master/tests/tpoo...
- IPGlider 13y agoThat looks nice. I used libdispatch to prototype a server and would be great to compare with other libraries before starting the project. libPhenom seems to have much more features, maybe even more than I need, but the documentation seems good. I will try to make another prototype with your lib. Thanks.
- nwmcsween 13y agoWhy do you do -fno-omit-frame-pointer on x86_64 the ABI requires dwarf or is there something I'm missing?
- wezfurlong 13y agoFrame pointers make things easier for tools to get backtraces without requiring complex dwarf unwinders. The observability is something I value more than not being able to use that register for other things.
- throwaway812 13y agoFunctionality: Well, libdispatch doesn't really work outside of OS X, and this is primarily targeted at Linux server apps. I can't comment on performance.
- IPGlider 13y agolibdispatch works on FreeBSD (https://wiki.freebsd.org/GCD https://wiki.freebsd.org/GCD) and on Linux (http://packages.debian.org/wheezy/libdispatch-dev http://packages.debian.org/wheezy/libdispatch-dev), but I don't know if blocks works on Linux.
- Moto7451 13y agoIf you use clang you get blocks: http://stackoverflow.com/questions/5907071/clang-block-in-linux http://stackoverflow.com/questions/5907071/clang-block-in-li...
- throwaway812 13y agoThe library may work, but Grand Central Dispatch, which is the whole point, is really an OS X thing. BSD may have adopted it, not sure. I'm pretty that confident Linux has not.
- fyolnish 13y agoGrand Central Dispatch is just the marketing name for libdispatch. The do use pthread work queues if available, which they are on OSX & BSD. On linux a thread pool is used
- throwaway812 13y agoYes, so there's absolutely no reason to use it if you're primarily targeting Linux.
- petsos 13y agoAlso, it doesn't look very active: https://libdispatch.macosforge.org/trac/log/ https://libdispatch.macosforge.org/trac/log/