3ef7736b1d
- 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
33 lines
1.1 KiB
Python
33 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
import csv
|
|
|
|
# Read the performance data
|
|
data = {}
|
|
with open('performance_data.csv', 'r') as f:
|
|
reader = csv.reader(f)
|
|
next(reader) # Skip header
|
|
for row in reader:
|
|
if len(row) >= 5:
|
|
decimals = row[0]
|
|
# Skip rows where language name is missing or is just "SUCCESS"
|
|
if row[1] and row[1] not in ['SUCCESS', 'Brainfuck', 'Ruby'] and not row[1].startswith('3.'):
|
|
language = row[1]
|
|
time = row[2]
|
|
memory = row[3]
|
|
status = row[4]
|
|
|
|
if decimals not in data:
|
|
data[decimals] = []
|
|
data[decimals].append({
|
|
'language': language,
|
|
'time': time,
|
|
'memory': memory,
|
|
'status': status
|
|
})
|
|
|
|
# Print summary
|
|
for dec in ['1', '2', '5', '10', '100', '1000', '2000']:
|
|
if dec in data:
|
|
print(f"\n=== {dec} decimals ===")
|
|
for entry in data[dec][:10]: # Show first 10
|
|
print(f"{entry['language']}: {entry['time']}ms, {entry['memory']}") |