Questions, answers, and comments from our collaborative document

Any new tool/concept that you learned in the last week?

  • yes: google-benchmark, quite useful for microbenchmarks but their usefulness on the other hand is in question, you can time a snippet of code, it takes care of interferences that you can get by the os eg., https://github.com/google/benchmark
#include <benchmark/benchmark.h>

static void BM_SomeFunction(benchmark::State& state) {
  // Perform setup here
  for (auto _ : state) {
    // This code gets timed
    SomeFunction();
  }
}
// Register the function as a benchmark
BENCHMARK(BM_SomeFunction);
// Run the benchmark
BENCHMARK_MAIN();

Benchmark                               Time(ns)    CPU(ns) Iterations
----------------------------------------------------------------------
BM_SetInsert/1024/1                        28928      29349      23853  133.097kB/s   33.2742k items/s
BM_SetInsert/1024/8                        32065      32913      21375  949.487kB/s   237.372k items/s
BM_SetInsert/1024/10                       33157      33648      21431  1.13369MB/s   290.225k items/s
  • I was experimenting with https://github.com/google/jax (for automatic differentiation)

  • maybe not discovered, but still trying to use gdb for real, it is not too easy to handle

About the hashbang

  • Curiously “/usr/bin/env make -f” works ok on the command line. No quotes.

  • there seems to be an answer https://unix.stackexchange.com/questions/399690/multiple-arguments-in-shebang

    • #!/usr/bin/env -S command arg1 arg2 ...
    • but it says not portable
    • coreutils >= 8.3

PyPI part

Packaging

Other questions

  • Are you planning for a summer break?
    • Great idea. We will and we will be back in August.