time-to-botec

Benchmark sampling in different programming languages
Log | Files | Refs | README

README.md (1172B)


      1 # Time to BOTEC in C
      2 
      3 This repository contains a few implementations of a simple botec (back-of-the-envelope) calculation in C:
      4 
      5 - In the folder C-01-simple/, you can see a simple implementation, which passes large arrays around
      6 - In the folder C-02-better-algorithm-one-thread/ you can see a better implementations, that passes around pointers to functions, which makes the implementation more efficient
      7 - The top level samples.c uses the algorithm improvements in C-02..., and also implements multithreading using OpenMP
      8 
      9 ## To do
     10 
     11 - [ ] Add Windows/Powershell time-measuring commands
     12 - [ ] Add CUDA?
     13 - [x] Added results of perf. `rand_r` seems like a big chunk of it, but I'm hesitant to use lower-quality random numbers
     14   - [x] used xorshift instead
     15   - [-] Use xorshift with a struct instead of a pointer? idk, could be faster for some reason? => Tested, it takes the same time.
     16 - [x] Update repository with correct timing
     17 - [x] Use better profiling approach to capture timing with 1M samples.
     18 - [x] See if program can be reworded so as to use multithreading effectively, e.g., so that you see speed gains proportional to the number of threads used