The Cost of a Closure in C: The Rest

(thephd.dev)

19 points | by ingve 2 days ago

4 comments

  • userbinator 1 hour ago
    Those graph axes units are... perplexing, to say the least.

    So, we need to swap to the logarithmic graphs to get a better picture

    I wish more people would know about decibels.

  • andsoitis 1 hour ago
    > Cost of a Closure in C

    C does not have closures. You could simulate closures, but it is neither robust not automatic compared to languages tha truly support them.

    • aragilar 1 hour ago
      C does not currently have closures, the post it looking at their performance properties with an eye for what form closures should be added to the standard.
  • Panzerschrek 1 hour ago
    Why struggling using qsort? std::sort from C++ is much better in terms of usability and performance.
  • djaouen 1 hour ago
    Lisp solves the performance hit of closures with macros. However, given what macros look like in C, I hope it never amounts to that!