GithubHelp home page GithubHelp logo

conorwilliams / libfork Goto Github PK

View Code? Open in Web Editor NEW
465.0 465.0 18.0 6.51 MB

A bleeding-edge, lock-free, wait-free, continuation-stealing tasking library built on C++20's coroutines

Home Page: https://conorwilliams.github.io/libfork/

License: Mozilla Public License 2.0

CMake 2.81% C++ 92.60% Shell 0.31% Python 4.28%
cactus-stack concurrency concurrent coroutines cpp20 lock-free parallel parallel-computing scheduler task-graph tasking threading threadpool wait-free work-stealing

libfork's People

Contributors

conorwilliams avatar imgbotapp avatar martymcflyinthesky avatar tzcnt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

libfork's Issues

Performance section desired simplification

The Performance section in the readme doesn't have any timings provided, while the paper is absolutely unreadable because it's written in academic matters: formulas, coefficients, etc.
It would be great to have simple timings for simple developers that just want to use the library and want to have practical comparison in nanoseconds or CPU cycles: how much it takes to construct the task body, how much it takes for the task worker thread to pick up the task.

Think of comprehensive benchmarks like here: https://github.com/SergeyMakeev/ExcaliburHash

P.S. anyway, thanks for the amazing work!
I was thinking about such a library some time ago and found this. That's amazing!

Performance, benchmarks, ...

Hi, I've just discovered this potential gem. But to be sure the features reflect in practical setting, we'd need to test it first.

Do you have any such performance benchmarks (even if not rigorous...)?

I'd be mostly interested in direct comparison with Nim's Weave which I myself consider as state-of-the-art library. So ideally the benchmarks could be aligned with Weave's ones ๐Ÿ˜‰.

Thoughts?

Benchmarks on c7g.16xlarge

I managed to get the benchmark suite to run on an AWS c7g.16xlarge instance running Ubuntu 22.04, built with Clang 15 (with Release build type), with the machine otherwise quiet. Benchmarks were done on 8dd4984 (current tip of tree).

See the attached log: results.txt

Invalid default compiler flag on ARM

On Ubuntu 22.04 running on a c7g.16xlarge AWS instance with Clang 15, I get the following error following HACKING.md:

CMake Error at /usr/share/cmake-3.22/Modules/CMakeTestCXXCompiler.cmake:62 (message):
  The C++ compiler

    "/usr/bin/clang++-15"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/ubuntu/libfork/build/dev/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/ninja cmTC_1185a && [1/2] Building CXX object CMakeFiles/cmTC_1185a.dir/testCXXCompiler.cxx.o
    FAILED: CMakeFiles/cmTC_1185a.dir/testCXXCompiler.cxx.o
    /usr/bin/clang++-15   -Wno-assume -D_FORTIFY_SOURCE=3 -fstack-protector-strong -fcf-protection=full -fstack-clash-protection -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wcast-qual -Wformat=2 -Wundef -Werror=float-equal -Wshadow -Wcast-align -Wunused -Wnull-dereference -Wdouble-promotion -Wimplicit-fallthrough -Wextra-semi -Woverloaded-virtual -Wnon-virtual-dtor -Wold-style-cast  -std=c++20 -MD -MT CMakeFiles/cmTC_1185a.dir/testCXXCompiler.cxx.o -MF CMakeFiles/cmTC_1185a.dir/testCXXCompiler.cxx.o.d -o CMakeFiles/cmTC_1185a.dir/testCXXCompiler.cxx.o -c /home/ubuntu/libfork/build/dev/CMakeFiles/CMakeTmp/testCXXCompiler.cxx

The following change allows it to build:

diff --git a/CMakePresets.json b/CMakePresets.json
index 3134d07..c173de0 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -61,7 +61,7 @@
       "name": "flags-linux",
       "hidden": true,
       "cacheVariables": {
-        "CMAKE_CXX_FLAGS": "-Wno-assume -D_FORTIFY_SOURCE=3 -fstack-protector-strong -fcf-protection=full -fstack-clash-protection -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wcast-qual -Wformat=2 -Wundef -Werror=float-equal -Wshadow -Wcast-align -Wunused -Wnull-dereference -Wdouble-promotion -Wimplicit-fallthrough -Wextra-semi -Woverloaded-virtual -Wnon-virtual-dtor -Wold-style-cast",
+        "CMAKE_CXX_FLAGS": "-Wno-assume -D_FORTIFY_SOURCE=3 -fstack-protector-strong -fstack-clash-protection -Wall -Wextra -Wpedantic -Wconversion -Wsign-conversion -Wcast-qual -Wformat=2 -Wundef -Werror=float-equal -Wshadow -Wcast-align -Wunused -Wnull-dereference -Wdouble-promotion -Wimplicit-fallthrough -Wextra-semi -Woverloaded-virtual -Wnon-virtual-dtor -Wold-style-cast",
         "CMAKE_EXE_LINKER_FLAGS": "-Wl,--allow-shlib-undefined,--as-needed,-z,noexecstack,-z,relro,-z,now",
         "CMAKE_SHARED_LINKER_FLAGS": "-Wl,--allow-shlib-undefined,--as-needed,-z,noexecstack,-z,relro,-z,now"
       }

Findhwloc CMake script not working

Your findhwloc CMake script doesn't work on my environment. I get this output:

[cmake] -- Could NOT find HwlocLibfork (missing: HwlocLibfork_INCLUDE_DIRS) (found suitable version "2.9.0", minimum required is "2.5.0")
[cmake] -- Found hwloc 2.9.0 in :hwloc
[cmake] CMake Warning at CMakeLists.txt:87 (message):
[cmake]   HWLOC not found, NUMA support disabled!

It seems to be failing to find the include file. I'm using Debian 12. My hwloc is installed as a system package, and the include file is in the most usual place...

โžœ  ~ ls /usr/include | grep hwloc.h
hwloc.h
โžœ  ~ sudo apt install libhwloc-dev
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libhwloc-dev is already the newest version (2.9.0-1).

My substantially less complex script seems to find the library and include file just fine.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.