GithubHelp home page GithubHelp logo

numbers's Introduction

numbers

Some interesting numbers in systems programming, possibly with references.

Treat this as a brain dump. Contributions are welcome.

Type Size Switch latency (order of magnitude) / cost Notes
Erlang process 309 machine words (8 Bytes * 309 on 64bit arch) (Likely in the order of magnitude of the golang switch, possibly faster because platform is optimised for soft realtime) Stack size is dynamic, garbage collection runs per user space thread
Golang process 2kB ~170 ns dynamically allocated
Linux thread ulimit -s gives me 8MiB on my machine; ~2us for a context switch
Linux process creation ~5us
Linux thread creation ~35us
Linux rseq
atomic operations same as variable 6 instructions - ~ns hidden costs due to cache invalidation problems
Linux futex (mutex impl) ~100 us This includes a context switch (still trying to stay in user space as much as possible. The bigger chunk of the time should come from the context switch itself, so probably this number and the one above for thread context switch are not consistent

numbers's People

Contributors

dwaas avatar

Watchers

 avatar

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.