hbbench v1.0: A benchmark suite for Harbour (12 categories, 37 tests)

75 views
Skip to first unread message

marcos...@gmail.com

unread,
Sep 25, 2026, 12:40:23 AM (9 days ago) Sep 25
to Harbour Users
Hello everyone

To measure the efficiency of Harbour, I have created a Benchmark Suite. Source code on GitHub:

- Covers 12 categories: VM, String, Array, NumDate, Eval, DBF,
  File, Regex, MemObj, Concur, MT, and Net (reserved)
- Includes 31 single-thread tests and 6 multi-thread tests (1000-1005)
- Supports CLI options: --loops, --only, --exclude, --mt, --mt-only,
  --threads, --csv, --json, --output, --nolog, --noenv
- CSV and JSON result export
- Automatic logging and reporting system
- Bilingual README (Spanish/English) with full user manual
- Folder structure: data/, logs/, and reports/

https://github.com/BadaSystem/hbbench

09/24/2026 17:49:23 Windows 10 10.0.19045
Harbour 3.2.0dev (r2503200530)  Borland C++ 5.8.2 (32-bit)
LOOPS: 1000000

==============================================================================
TEST                                                        SECONDS
==============================================================================
[ 000: empty loop overhead ].....................................0.000
[ 001: local char assign ].......................................0.031
[ 002: local num assign ]........................................0.031
[ 003: Eval pre-compiled codeblock ].............................0.078
Running test 004 ...          0.55
[ 004: Direct & macro (literal overhead) ].......................0.031
[ 100: Upper() ].................................................0.156
[ 101: Lower() ].................................................0.125
[ 102: AllTrim() ]...............................................0.125
[ 200: Array assign ]............................................0.078
Running test 201 ...          1.38
[ 201: AScan() ].................................................0.125
[ 202: Hash assign (1000000 iter, pre-alloc) ]...................0.484
[ 203: GC stress (100000 nested arrays, checksum=500005000 ].....0.047
[ 204: Hash iteration (200000 keys, sum=20000100000) ]...........0.063
[ 300: Round() ].................................................0.109
Running test 301 ...          2.64
[ 301: Date math ]...............................................0.063
[ 400: Eval block ]..............................................0.156
[ 401: Eval var block ]..........................................0.125
[ 500: indexed seek (CODE) 50000 iter ]..........................0.172
[ 501: sequential scan (500 recs) 500 iter ].....................0.328
Running test 502 ...          3.80
[ 502: append + unlock 5000 iter ]...............................0.500
[ 600: MemoWrit (1000 iter) ]....................................0.047
[ 601: MemoRead (5000 iter) ]....................................0.078
[ 700: hb_regexLike email ]......................................0.844
[ 701: hb_RegExMatch digits ]....................................0.594
Running test 800 ...          6.17
[ 800: ErrorNew args ]...........................................0.094
[ 801: hb_Base64Encode ].........................................0.109
[ 802: HB_Serialize (complex hash) ].............................0.141
[ 803: HB_DeSerialize ]..........................................0.063
[ 804: Serialize+DeSerialize roundtrip (200000 iter) ]...........1.766
Running test 900 ...          8.66
[ 900: hb_mutexCreate ]..........................................0.172
[ 901: mutex lock/unlock ].......................................0.188
==============================================================================
[ Total CPU time: ]..............................................8.984
[ Total real time: ].............................................9.295

Log file: logs\hbbench_20260924_174923.log
 [OK] Results exported to JSON: reports\bench_20260924_174932.json

Best regards

Marcos Jarrín
Reply all
Reply to author
Forward
0 new messages