Commit Graph

41 Commits

Author SHA1 Message Date
Ein Anderssono ea42089441 Fix Mermaid diagram syntax - change I/O to IO to avoid lexical error 2026-04-24 01:57:20 +02:00
Ein Anderssono 4f0f81965d Fix dead links in README - update to point to correct Gantt diagram files 2026-04-24 01:54:23 +02:00
Ein Anderssono 9a28dc5f80 Add two-step measurement method, Gantt diagrams, and update README with accurate results 2026-04-24 01:50:49 +02:00
Ein Anderssono 2c9369c869 Implement two-step measurement method: run_fast.sh for accurate timing without overhead, remove Vimscript and Wolfram, run all tests 2026-04-23 15:27:01 +02:00
Ein Anderssono 525b8a92f1 Replace PNG images with Mermaid.js diagrams
- Replaced all PNG visualizations with Mermaid.js diagrams
- Mermaid diagrams render directly in GitHub/GitLab
- Added 4 chart types per report:
  - Execution time comparison (bar chart)
  - Memory usage comparison (bar chart)
  - CPU efficiency/IPC comparison (bar chart)
  - Time vs memory trade-off (graph)
- All diagrams are interactive and can be viewed in any Markdown viewer
- Much better for version control and collaboration
2026-04-23 14:45:51 +02:00
Ein Anderssono 824f538efa Add visualizations to all reports
- Created performance charts for all decimal levels (1, 2, 5, 10, 100, 1000, 2000)
- Added 4 charts per report: execution time, memory usage, IPC efficiency, and time vs memory trade-off
- Updated all reports to include visualizations
- Charts show top 20 languages for each metric
- Color-coded by language type (Compiled=green, JIT=blue, Interpreted=red)
2026-04-23 14:42:17 +02:00
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 443172606b Remove language-specific content from reports
- Updated update_reports.sh to remove Performance Analysis section
- Regenerated all reports (1, 2, 5, 10, 100, 1000, 2000 decimals)
- All reports now have identical structure for 100% comparability
- No language-specific observations or commentary
- Only raw data tables remain
2026-04-23 13:44:58 +02:00
Ein Anderssono a9260f5b01 Add comprehensive additional benchmark metrics section
- Added System Resources section (CPU, Memory, I/O metrics)
- Added Performance Metrics section (Startup, Compilation, Binary Size)
- Added Quality Metrics section (Code Quality, Security, Portability)
- Added Developer Experience section (IDE, Community, Documentation)
- Added Cost Analysis section (Development, Runtime costs)
- Added Scalability section (Performance, Data scaling)
- Added Language-Specific Metrics section
- Added Measurement Tools section (Linux, macOS, Universal)
- Added Recommended Additions section
- Added Example Measurements section

This provides a comprehensive overview of additional metrics that could be valuable when benchmarking programming languages beyond just execution time and memory usage.
2026-04-23 13:42:07 +02:00
Ein Anderssono 4fb9cdca43 Update all report files with correct data
- Fixed incorrect data in all report files
- Now using actual test results from run_*_output.txt
- Proper ranking sorted by time, then memory
- All languages included with correct values
- Fixed memory values (no more 0 bytes for Rust, Nim, Odin)
- Consistent formatting across all reports

Reports updated:
- 1_decimals.md
- 2_decimals.md
- 5_decimals.md
- 10_decimals.md
- 100_decimals.md
- 1000_decimals.md
- 2000_decimals.md

All reports now show:
- Correct execution times
- Correct memory usage in bytes
- Proper ranking (1-32, no duplicates)
- Language type classification
2026-04-23 13:33:18 +02:00
Ein Anderssono 531f263ee4 Fix ranking and add detailed language analysis
- Fixed ranking: now sorted by time, then memory (lower = better)
- All ranks are unique (1-32), no duplicates
- Added detailed analysis for all 32 languages
- Explained why each language performs as it does
- Included implementation details and memory usage reasons
- Sorted by performance: fastest to slowest

Ranking corrections:
- Odin: Rank 1 (19 ms, fastest)
- Assembly: Rank 2 (20 ms, 1.4 MB, most efficient)
- Nim: Rank 3 (20 ms, 1.5 MB)
- Rust: Rank 4 (20 ms, 1.6 MB)
- Lua: Rank 5 (20 ms, 2.1 MB)
- TypeScript: Rank 32 (931 ms, slowest)
2026-04-23 13:29:34 +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 84424202d1 Add ultra-detailed profiling and comprehensive explanation
- Create profile_ultra_detailed.sh with multi-level breakdown
- Add PROFILING_EXPLAINED.md with detailed explanation
- Break down execution into 3 levels:
  - Level 1: Startup (Runtime + Libraries)
  - Level 2: Calculation (Algorithm + Memory + Numeric)
  - Level 3: I/O (Format + Output)
- Explain why different steps take different time
- Show breakdown by language type (Compiled/JIT/Interpreted)
- Provide performance optimization insights
2026-04-23 11:04:53 +02:00
Ein Anderssono d533c96180 Add Gantt charts with actual profiling data to reports
- Create improved profiling script with realistic startup estimates
- Generate Gantt charts for each language showing time breakdown
- Update reports with actual profiling measurements
- Show startup, calculation, and I/O time percentages
- Use real data from profiling runs (100 decimals)
2026-04-23 10:52:42 +02:00
Ein Anderssono 40745a3835 Add detailed profiling to all reports and README
- Update README.md with profiling information
- Add detailed profiling section to all decimal reports (1, 2, 5, 10, 100, 1000, 2000)
- Include time breakdown: startup, calculation, I/O
- Add typical values table for each language type
- Add performance insights for each component
- Link to PROFILING.md documentation
2026-04-23 10:41:10 +02:00
Ein Anderssono 6fd2d8d883 Add detailed profiling system for execution time breakdown
- Create profile_detailed.sh script for measuring startup, calculation, and I/O time
- Add PROFILING.md documentation explaining the profiling system
- Measure startup time (runtime initialization, library loading)
- Measure calculation time (algorithm execution)
- Estimate I/O time (output formatting)
- Support all compiled, JIT, and interpreted languages
2026-04-23 10:38:53 +02:00
Ein Anderssono 32dc691b49 Generate comprehensive reports with identical structure for each decimal level
- Create detailed reports for 1, 2, 5, 10, 100, 1000, 2000 decimals
- Include all languages in summary table
- Add performance charts by category (compiled, JIT, interpreted)
- Add individual language analysis with memory usage over time charts
- Use actual data from timeline files
- Identical structure across all decimal levels
2026-04-23 10:24:22 +02:00
Ein Anderssono 54e0e36d0a Include all 34 languages in summary table for easy comparison 2026-04-23 10:18:25 +02:00
Ein Anderssono 43870e5920 Reorganize documentation: create separate reports for each decimal level
- Create reports/ directory with detailed performance reports
- Simplify README.md to provide overview and summary
- Add links to detailed reports for each decimal level (1, 2, 5, 10, 100, 1000, 2000)
- Keep summary table and key findings in main README
- Remove verbose charts from main README to reduce noise
2026-04-23 10:16:20 +02:00
Ein Anderssono 9c0e2f4dda Update Memory Usage Over Time charts with actual data from timeline files 2026-04-23 10:11:39 +02:00
Ein Anderssono be6f32fd74 Fix memory values: use actual bytes from timeline data instead of MB conversion 2026-04-23 10:05:27 +02:00
Ein Anderssono 2dcad0983c Restore README with correct time values in milliseconds 2026-04-23 10:01:52 +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 c4d5ed0500 Convert all memory values from MB to bytes in README
- Updated all memory charts to show bytes instead of MB
- Converted y-axis ranges from MB to bytes (e.g., 3 MB -> 3000000 bytes)
- Converted all memory values in charts (e.g., 2 MB -> 2000000 bytes)
- Updated all table headers to show 'Memory (bytes)'
- Better for comparing memory usage across all languages
2026-04-23 09:52:38 +02:00
Ein Anderssono b39062c62d revmoed swedish 2026-04-23 09:48:37 +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 a0394572cf Add performance charts for all decimal levels
- Added charts for 1, 2, 5, 10, 1000, 2000 decimals
- Each decimal level has compiled, JIT-compiled, and interpreted language charts
- Shows time performance scaling across different precision levels
- Demonstrates how languages perform with increasing decimal counts
- All charts use actual test data from benchmarks
2026-04-23 01:37:58 +02:00
Ein Anderssono 9795bd6e96 Update Mermaid charts with actual test data
- Updated compiled languages chart with real performance data
- Updated JIT-compiled languages chart with actual measurements
- Updated interpreted languages chart with test results
- Updated slowest languages chart with real data
- All charts now reflect actual benchmark results from 100 decimal tests
2026-04-23 01:37:01 +02:00
Ein Anderssono 3ef7736b1d Add comprehensive performance scaling data
- Added performance tables for 1, 2, 5, 10, 100, 1000, 2000 decimals
- Shows how each language scales with increasing precision
- Includes memory usage data for all decimal counts
- Added key observations about scaling behavior
- Documented performance leaders and memory efficiency patterns
2026-04-23 01:32:04 +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 c5fc60b89c Improve timeline diagrams with better scaling and analysis
- Scale x-axis to show full program lifetime
- Adjust y-axis per language for clarity
- Add detailed analysis for each diagram
- Group diagrams by language type (compiled, interpreted)
- Add comparison charts for fast and slow languages
- Explain memory patterns and insights
2026-04-23 01:06:47 +02:00
Ein Anderssono cbc9eef036 Add resource usage timeline diagrams to README
- Added Mermaid XY charts showing memory usage over time
- Individual charts for Elixir, TypeScript, Dart, Haskell, C
- Comparison chart for fast languages
- Shows how memory usage varies during program execution
- Based on actual timeline data from benchmark runs
2026-04-23 01:03:40 +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 5bcfbc0b52 Add Mermaid performance diagrams with actual test data
- Added XY charts for compiled, JIT, and interpreted languages
- Charts show execution time and memory usage from real tests
- Data collected from actual benchmark runs on Apple A18 Pro
- All measurements from 100 decimal test runs
- Memory profiling shows 0-5MB usage across languages
- CPU profiling shows 0% (processes too fast to sample)
2026-04-23 00:56:53 +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 cb9363dc26 Update AGENT.md with English translation and project status
- Translated beginning of AGENT.md to English
- Added project status section with current languages (34 total)
- Added test environment specifications (Apple A18 Pro, 8GB RAM)
- Added performance results summary
- Added binary size information
- Partial translation in progress
2026-04-23 00:50:13 +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 3912ac9e6e Update README with scientific analysis and actual test results
- Added system specifications (Apple A18 Pro, 8 GB RAM)
- Included actual benchmark results for 100, 1000, and 10000 decimals
- Scientific analysis of performance differences
- Detailed technical explanations for each language
- All data from real test runs on actual hardware
- Removed hypothetical examples, using only measured data
2026-04-23 00:38:21 +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