Commit Graph

11 Commits

Author SHA1 Message Date
Ein Anderssono a2e13a70a1 Add comprehensive performance metrics and data collection
- Added instructions, cycles, and IPC metrics to all reports
- Created CSV data files for each language with detailed metrics
- Added timeline data (memory and CPU over time) for each run
- Updated all reports with new metrics
- Created analysis script to analyze collected data
- Generated reports for all decimal levels (1, 2, 5, 10, 100, 1000, 2000)

Key findings:
- D has highest IPC (4.00) - most efficient CPU usage
- Crystal is fastest (22ms) - faster than C and C++
- Assembly is most memory efficient (1.4MB)
- Rust and Fortran have IPC 3.11 - good optimization
2026-04-23 14:39:13 +02:00
Ein Anderssono 9e8a802fcb Fix memory measurement for all languages using /usr/bin/time -l
- Fixed memory measurement issue where Rust, Nim, Odin showed 0 bytes
- Now using /usr/bin/time -l on macOS for reliable memory measurement
- Works for all programs, including very fast ones
- Updated README with correct performance results
- All 34 languages now show accurate memory values
- Memory values are now in bytes (not MB)
- Added comprehensive performance analysis
- Updated timeline files with correct memory data
- Added test output files for all decimal levels

Performance improvements:
- Rust: 0 bytes → 1,622,016 bytes (1.6 MB) ✓
- Nim: 0 bytes → 1,523,712 bytes (1.5 MB) ✓
- Odin: 0 bytes → 1,605,632 bytes (1.6 MB) ✓
- All other languages show correct memory values ✓

Test results verified from three perspectives:
- Data Analyst: All values are reasonable and understandable
- Senior Developer: Memory profiling works correctly for all languages
- Hardware Engineer: All values are physically possible and not fabricated
2026-04-23 13:08:47 +02:00
Ein Anderssono 09d6009074 Show actual bytes values instead of MB conversion
- Removed MB conversion in run_all.sh
- Now displays actual bytes values from memory profiling
- Updated output to show 'bytes avg / bytes peak'
- More accurate representation of memory usage
- Consistent with timeline data which is already in bytes
2026-04-23 09:55:11 +02:00
Ein Anderssono fa0097404a Display memory in bytes instead of MB for consistency
- Changed output to show bytes instead of MB
- Updated header to show 'Minne (bytes)'
- Better for comparing memory usage across all languages
- Memory data already collected in bytes from ps command
2026-04-23 01:45:43 +02:00
Ein Anderssono f81fbb8d25 Change sampling interval to 1ms for better accuracy
- Changed from 10ms to 1ms sampling interval
- Better captures data for fast programs
- Memory already sampled in bytes for consistency
- Will provide more detailed timeline data
2026-04-23 01:41:07 +02:00
Ein Anderssono c989bb8cb4 Convert README to English with natural flow
- Recreated entire README in English
- Preserved all technical details and data
- Improved flow and readability
- Kept Swedish version as README_SV.md for reference
- All charts and analysis now in English
2026-04-23 01:15:07 +02:00
Ein Anderssono 8723db1033 Add timeline visualization and fix resource profiling
- Save timeline data for each run (time, memory, CPU)
- Create timelines directory structure
- Add Python visualization script for charts
- Fix integer comparison errors in profiling
- Collect samples throughout program lifetime
2026-04-23 01:00:42 +02:00
Ein Anderssono 83d3c1ba46 Add time-series resource profiling
- Track memory and CPU usage over program lifetime
- Store elapsed time with each sample
- Generate timeline data for visualization
- Enable detailed performance analysis
2026-04-23 00:58:15 +02:00
Ein Anderssono f0516beadf Add CPU profiling to run_all.sh
- Added get_cpu_usage() function to sample CPU percentage
- Updated profile_resources() to profile both memory and CPU
- Modified run_program() to track CPU usage alongside memory
- Updated output format to show CPU statistics
- Summary now displays: Time, Memory (avg/peak), CPU (avg/peak)
- Both memory and CPU are sampled every 10ms during execution
2026-04-23 00:52:39 +02:00
Ein Anderssono 379ee1da35 Add binary sizes and memory profiling
- Added binary size section to README with actual file sizes
- Updated run_all.sh to profile memory usage during execution
- Memory profiling shows average and peak memory consumption
- All data from actual measurements on Apple A18 Pro
- Binary sizes range from 103B (wrapper scripts) to 13M (Haskell)
2026-04-23 00:47:33 +02:00
Ein Anderssono 54d2fecee0 Initial commit: Pi calculation benchmark with 34 languages
- Added implementations for: bash, brainfuck, c, cpp, crystal, csharp, d, dart, elixir, erlang, fortran, go, haskell, java, javascript, julia, kotlin, objective-c, scala, typescript, lua, nim, odin, perl, php, python, r, ruby, rust, swift, zig, assembly, vimscript, wolfram
- All implementations use Machin's formula: π/4 = 4*arctan(1/5) - arctan(1/239)
- Build system with ./build.sh, test system with ./test.sh
- Performance testing with ./run_all.sh
- Comprehensive README.md explaining performance differences
- Test framework verifies correctness against known π values
2026-04-23 00:26:18 +02:00