Hacker News new | ask | show | jobs
by damien 2941 days ago
It does close the gap.

Before:

  cc -shared -fPIC -Os -s -o empty.so empty.c
  cc -std=c99 -Wall -Wextra -O3 -g3 -fpie -pie -o benchmark benchmark.c ./empty.so -ldl

  jit: 1.541608 ns/call
  plt: 2.309939 ns/call
  ind: 1.540583 ns/call
  
After:

  cc -shared -fPIC -Os -s -o empty.so empty.c
  cc -std=c99 -Wall -Wextra -O3 -g3 -fpie -fno-plt -pie -o benchmark benchmark.c ./empty.so -ldl

  jit: 1.541836 ns/call
  plt: 1.539239 ns/call
  ind: 1.542874 ns/call