Skip to content

Commit b991790

Browse files
committed
chore: update implementation status from benchmark suite
Benchmark results summary: - Total implementations: 47 - 🟢 Excellent: 29 - 🟡 Good: 17 - 🔴 Needs work: 1 Performance testing completed with status updates.
1 parent 0751224 commit b991790

File tree

3 files changed

+145
-41
lines changed

3 files changed

+145
-41
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ All implementations have complete feature parity with the following features:
2222
| 🎯 Dart | 🟡 | [1739](implementations/dart/bin/main.dart) | 542ms | 3109ms | 1277ms | 451 MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
2323
| 🌳 Elm | 🟢 | [1663](implementations/elm/src/ChessEngine.elm) | 1395ms | 358ms | 379ms | 9 MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
2424
| ✨ Gleam | 🟢 | [1917](implementations/gleam/src/chess_engine.gleam) | 288ms | 777ms | 333ms | 110 MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
25-
| 🐹 Go | 🟢 | [2237](implementations/go/chess.go) | 202ms | 1039ms | 1145ms | 115 MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
25+
| 🐹 Go | 🟢 | [2237](implementations/go/chess.go) | 443ms | 1085ms | 1150ms | 115 MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
2626
| 📐 Haskell | 🟢 | [1085](implementations/haskell/src/Main.hs) | 423ms | 229ms | 217ms | 115 MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
2727
| 🪶 Imba | 🟡 | [700](implementations/imba/chess.imba) | 322ms | 195ms | 209ms | 110 MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
2828
| 🟨 Javascript | 🟡 | [682](implementations/javascript/chess.js) | 200ms | 191ms | 192ms | 110 MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
@@ -37,7 +37,7 @@ All implementations have complete feature parity with the following features:
3737
| ❤️ Ruby | 🟡 | [1906](implementations/ruby/chess.rb) | 354ms | 1850ms | 1661ms | - MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
3838
| 🦀 Rust | 🟢 | [1852](implementations/rust/src/main.rs) | 13974ms | 188ms | 197ms | 110 MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
3939
| 🐦 Swift | 🟢 | [856](implementations/swift/src/main.swift) | 369ms | 181ms | 195ms | 114 MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
40-
| 📘 Typescript | 🟡 | [1773](implementations/typescript/src/chess.ts) | 448ms | 945ms | 1919ms | - MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
40+
| 📘 Typescript | 🟡 | [1773](implementations/typescript/src/chess.ts) | 183ms | 179ms | 216ms | 7 MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
4141
| ⚡ Zig | 🟢 | [1589](implementations/zig/src/main.zig) | 280ms | 188ms | 187ms | 110 MB | 6/9 (67%) `perft` `fen` `ai` `castling` `en_passant` `promotion` |
4242
<!-- status-table-end -->
4343

reports/typescript.json

Lines changed: 82 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@
66
"language": "typescript",
77
"version": "5.0",
88
"author": "TypeScript Implementation",
9-
"build": "npm install && npm run build",
10-
"run": "node dist/chess.js",
11-
"analyze": "npm install && npm run lint && npx tsc --noEmit && npx prettier --check src/*.ts",
12-
"test": "npm install && npm test",
139
"features": [
1410
"perft",
1511
"fen",
@@ -19,29 +15,96 @@
1915
"promotion"
2016
],
2117
"max_ai_depth": 5,
22-
"estimated_perft4_ms": 800
18+
"estimated_perft4_ms": 800,
19+
"build": "npm run build",
20+
"test": "npm test",
21+
"analyze": "npm run lint",
22+
"run": "node dist/chess.js"
2323
},
24+
"track": "v2-full",
25+
"profile": "quick",
2426
"timings": {
25-
"build_seconds": 0.4478421211242676,
26-
"analyze_seconds": 1.9185657501220703,
27-
"test_seconds": 0.9453387260437012
27+
"image_build_seconds": 0.2819831371307373,
28+
"build_seconds": 0.18298935890197754,
29+
"analyze_seconds": 0.21647119522094727,
30+
"test_seconds": 0.17933058738708496,
31+
"test_internal_seconds": 0.17933058738708496,
32+
"test_chess_engine_seconds": 8.44266676902771,
33+
"test_v2_full_seconds": 8.44266676902771
34+
},
35+
"memory": {
36+
"image": {
37+
"memory_mb": 110.6875,
38+
"peak_memory_mb": 110.6875,
39+
"avg_memory_mb": 83.359375,
40+
"avg_cpu_percent": 0.0,
41+
"samples": 3,
42+
"psutil_available": true
43+
},
44+
"build": {
45+
"memory_mb": 7.32421875,
46+
"peak_memory_mb": 7.32421875,
47+
"avg_cpu_percent": 0,
48+
"psutil_available": true,
49+
"source": "cgroup"
50+
},
51+
"analyze": {
52+
"memory_mb": 7.12890625,
53+
"peak_memory_mb": 7.12890625,
54+
"avg_cpu_percent": 0,
55+
"psutil_available": true,
56+
"source": "cgroup"
57+
},
58+
"test": {
59+
"memory_mb": 6.5703125,
60+
"peak_memory_mb": 6.5703125,
61+
"avg_cpu_percent": 0,
62+
"psutil_available": true,
63+
"source": "cgroup"
64+
}
65+
},
66+
"size": {
67+
"source_loc": 1997,
68+
"source_files": 17
69+
},
70+
"normalized": {
71+
"build_ms_per_kloc": 91.63212764245245,
72+
"analyze_ms_per_kloc": 108.39819490282787,
73+
"runtime_ms_per_kloc": 89.79999368406858
2874
},
29-
"memory": {},
3075
"docker": {
31-
"build_time": 0.4478421211242676,
76+
"build_time": 0.2819831371307373,
3277
"build_success": true,
33-
"test_time": 0.9453387260437012,
34-
"test_success": true
78+
"image_build_time": 0.2819831371307373,
79+
"image_build_success": true,
80+
"make_build_time": 0.18298935890197754,
81+
"make_build_success": true,
82+
"make_analyze_time": 0.21647119522094727,
83+
"make_analyze_success": true,
84+
"test_time": 0.17933058738708496,
85+
"test_success": true,
86+
"make_test_time": 0.17933058738708496,
87+
"make_test_success": true,
88+
"test_chess_engine_time": 8.44266676902771,
89+
"test_chess_engine_success": false,
90+
"track_test_time": 8.44266676902771,
91+
"track_test_success": false
92+
},
93+
"task_results": {
94+
"make_build": true,
95+
"make_analyze": true,
96+
"make_test": true,
97+
"make_test_chess_engine": false
3598
},
3699
"test_results": {
37-
"passed": [
38-
"docker_build",
39-
"docker_analyze",
40-
"docker_test"
41-
],
42-
"failed": []
100+
"passed": [],
101+
"failed": [
102+
"make_test_chess_engine"
103+
]
43104
},
44-
"errors": [],
105+
"errors": [
106+
"track v2-full suite failed: Found 1 implementation(s)\nLoaded 14 tests from test/suites/v2_full.json\n\nTesting typescript implementation at implementations/typescript\n----------------------------------------\nRunning test: Hash Command Baseline \u2713\nRunning test: Hash Command After Move \u2713\nRunning test: Draws Command \u2717\nRunning test: Go Movetime \u2717\nRunning test: PGN Show \u2717\nRunning test: PGN Fixture Morphy \u2717\nRunning test: PGN Fixture Byrne-Fischer \u2717\nRunning test: UCI Handshake \u2717\nRunning test: UCI Fixture Handshake \u2717\nRunning test: Ne"
107+
],
45108
"status": "completed"
46109
}
47110
]

reports/typescript.out.txt

Lines changed: 61 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
⚠️ psutil not available - memory monitoring disabled
21
🚀 Chess Engine Performance Testing Suite
32
============================================================
43
Found 1 implementation(s) to test
@@ -7,50 +6,92 @@ Found 1 implementation(s) to test
76
Testing typescript implementation
87
Path: implementations/typescript
98
============================================================
9+
📏 Source size: 1997 LOC across 17 files
1010
🧹 Clearing build cache...
1111
🔧 Running: make clean
1212
✅ Local cache cleared with make clean
1313
✅ Cache clearing completed
1414
🐳 Running all tests via Docker (ensures consistent environment)
1515
🐳 Running comprehensive Docker-based tests...
16-
🔨 Building Docker image (includes analysis and build)...
16+
🔨 Building Docker image (prerequisite)...
1717
🔧 Running: docker build -t chess-typescript .
18-
✅ Docker build completed in 0.45s
19-
🔍 Running static analysis...
18+
✅ Docker build completed in 0.28s
19+
🔧 Running task: make build
20+
🔧 Running: make build
21+
🔧 Running task: make analyze
2022
🔧 Running: make analyze
21-
♟️ Running chess engine tests...
23+
🔧 Running task: make test
2224
🔧 Running: make test
23-
✅ All Docker tests passed (build: 0.4s, analyze: 1.9s, test: 0.9s)
25+
🔧 Running task: make test-chess-engine (track=v2-full)
26+
❌ Docker tests failed in phases: make_test_chess_engine
2427

2528
================================================================================
2629
CHESS ENGINE PERFORMANCE TEST REPORT
27-
Generated: 2025-11-06 19:42:46
30+
Generated: 2026-03-05 12:11:14
2831
================================================================================
2932

3033
PERFORMANCE SUMMARY
31-
--------------------------------------------------------------------------------
32-
Language Status Analyze Build Test Memory Tests
33-
--------------------------------------------------------------------------------
34-
typescript completed 1.9s 0.4s 0.9s 0MB 3/3
34+
----------------------------------------------------------------------------------------------------------------------
35+
Language Status LOC Build Analyze Test Test-CE Memory Tasks
36+
----------------------------------------------------------------------------------------------------------------------
37+
typescript completed 1997 0.2s 0.2s 0.2s 8.4s 111MB 3/4
3538

3639
============================================================
3740
DETAILED RESULTS: TYPESCRIPT
3841
============================================================
3942

4043
TIMING BREAKDOWN:
41-
Build Seconds: 0.45s
42-
Analyze Seconds: 1.92s
43-
Test Seconds: 0.95s
44+
Image Build Seconds: 0.28s
45+
Build Seconds: 0.18s
46+
Analyze Seconds: 0.22s
47+
Test Seconds: 0.18s
48+
Test Internal Seconds: 0.18s
49+
Test Chess Engine Seconds: 8.44s
50+
Test V2 Full Seconds: 8.44s
4451

45-
CHESS ENGINE TESTS: 3 passed, 0 failed
52+
SOURCE SIZE:
53+
Source LOC: 1997 (files: 17)
54+
55+
NORMALIZED METRICS:
56+
Build: 91.63 ms/KLOC
57+
Analyze: 108.40 ms/KLOC
58+
Runtime: 89.80 ms/KLOC
59+
60+
MEMORY USAGE:
61+
Image: Peak 110.7MB, Avg 83.4MB
62+
Build: Peak 7.3MB, Avg 0.0MB
63+
Analyze: Peak 7.1MB, Avg 0.0MB
64+
Test: Peak 6.6MB, Avg 0.0MB
65+
66+
CHESS ENGINE TESTS: 0 passed, 1 failed
67+
Failed tests:
68+
❌ make_test_chess_engine
4669

4770
DOCKER TESTS:
48-
Build: ✅ (0.45s)
49-
Test: ✅ (0.95s)
71+
Image build: ✅ (0.28s)
72+
make build: ✅ (0.18s)
73+
make analyze: ✅ (0.22s)
74+
make test: ✅ (0.18s)
75+
make test-chess-engine (track=v2-full): ❌ (8.44s)
5076

51-
================================================================================
77+
ERRORS:
78+
❌ track v2-full suite failed: Found 1 implementation(s)
79+
Loaded 14 tests from test/suites/v2_full.json
80+
81+
Testing typescript implementation at implementations/typescript
82+
----------------------------------------
83+
Running test: Hash Command Baseline ✓
84+
Running test: Hash Command After Move ✓
85+
Running test: Draws Command ✗
86+
Running test: Go Movetime ✗
87+
Running test: PGN Show ✗
88+
Running test: PGN Fixture Morphy ✗
89+
Running test: PGN Fixture Byrne-Fischer ✗
90+
Running test: UCI Handshake ✗
91+
Running test: UCI Fixture Handshake ✗
92+
Running test: Ne
5293

53-
📄 Text report saved to benchmark_reports/performance_report_typescript.txt
54-
📄 JSON results saved to benchmark_reports/performance_data_typescript.json
94+
================================================================================
95+
📄 JSON results saved to reports/typescript.json (1 valid benchmark(s))
5596

5697
✅ All 1 implementation(s) completed successfully

0 commit comments

Comments
 (0)