rask24 / minishell

3 stars 0 forks source link

Standardize Header Inclusion Rules #69

Open rask24 opened 2 weeks ago

rask24 commented 2 weeks ago

Description

We need to standardize our header inclusion strategies. Currently, we have two options:

  1. Including necessary headers in individual files
  2. Including all potentially needed headers in module header files

The proposed standard is option 1.

Experiment

To validate this choice, I'll measure compilation times:

experiment-1 (applied option 1) experiment-2 (applied option 2)

rask24 commented 2 weeks ago

Benchmark

experiment-1 (https://github.com/rask24/minishell/tree/experiment-1)

❯  make clean
❯  time make
________________________________________________________
Executed in    1.37 secs      fish           external
   usr time  825.60 millis  132.00 micros  825.47 millis
   sys time  392.60 millis  525.00 micros  392.07 millis

experiment-2 (https://github.com/rask24/minishell/tree/experiment-2)

❯  make clean
❯  time make
________________________________________________________
Executed in    1.54 secs    fish           external
   usr time    1.00 secs  167.00 micros    1.00 secs
   sys time    0.43 secs  644.00 micros    0.43 secs