Giter Club home page Giter Club logo

Comments (7)

sustrik avatar sustrik commented on August 27, 2024

Have a look into "perf" subdirectory.

from libmill.

acornejo avatar acornejo commented on August 27, 2024

thanks, I had looked into that folder, but didn't find that particular benchmark. Its not that I believe that particular benchmark has any inherent value, I only wanted to use it because there are implementations of it already floating online for Go, Rust, Racket, Lisp, Haskell, etc.

I just implemented one. The results are both exciting and disappointing at the same time. For values of up to 10,000, libmill seems performs well, in fact in some runs it is faster than go!

Unfortunately, with bigger values it chokes really bad. For 100000 go takes 1.7 seconds on average on my laptop, and I left the libmill version running for minutes without getting an output (so there is probably some sort of deadlock going on).

Will submit a pull-request adding the whispers benchmark to libmill.

from libmill.

sustrik avatar sustrik commented on August 27, 2024

I've fixed couple of bugs and now I get this on my laptop:

sustrik@sustrik-glaptop:~/libmill$ ./perf/whispers 100000
100001
took 0.469000 seconds

Please, confirm.

from libmill.

acornejo avatar acornejo commented on August 27, 2024

unfortunately, it still chokes on 100,000.

I let it run until completion, it took 164 seconds.

What operating system are you testing on? I was trying to run on an osx laptop. I just tried it on linux, and there it does complete within a second, so perhaps this is some performance bottleneck caused by clang?

from libmill.

sustrik avatar sustrik commented on August 27, 2024

Unfortunately, I don't own an OSX box. For diagnostic purposes, can you check with gcc on OSX?

from libmill.

acornejo avatar acornejo commented on August 27, 2024

unfortunately installing gcc in osx is a PITA.

however, I did the next best thing, I installed clang on my linux box. There I can confirm that libmill works fine with clang 3.4, so this is probably not a compiler thing.

Perhaps this has something to do with the setjmp and longjmp of glibc vs whatever libc osx uses? Or even worse, this could be related to the kernel?

I haven't looked under the hood to see how libmill actually works (may do that next weekend when I get some more spare time), so I can't offer any additional insight.

from libmill.

sustrik avatar sustrik commented on August 27, 2024

My guess would be malloc() rather than set/longjmp().

Easy way to find out: Measure the setup phase (go commands) in whispers separately from message passing phase (chs/chr). If setup is slow, malloc is suspect. If sending is slow, longjmp is.

from libmill.

Related Issues (20)

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.