Skip to content

Commit

Permalink
add multithreaded bench
Browse files Browse the repository at this point in the history
bench: 2638316
  • Loading branch information
bftjoe committed Mar 8, 2024
1 parent 2f38d20 commit d405e26
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 14 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ This code is alpha status right now, and is intended for experiment/testing only
* The search is wider than upstream.
* Single file build for quicker compiles.
* Most reductions/extensions are removed.
* Increased minimum hash size to 32MB.
* Uses multi threaded bench for PGO builds

## Future plans

Expand Down
2 changes: 1 addition & 1 deletion generate
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
#below line commented out because it only needs to run once and has already been run
#below line technically only needs to run once
guard2once -r .
rm -rf build
cp -r src build
Expand Down
4 changes: 2 additions & 2 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ PREFIX = /usr/local
BINDIR = $(PREFIX)/bin

### Built-in benchmark for pgo-builds
PGOBENCH = $(WINE_PATH) ./$(EXE) bench
PGOBENCH = $(WINE_PATH) ./$(EXE) bench 64 3 14

### Source and object files
SRCS = main_gen.cpp
Expand Down Expand Up @@ -1037,7 +1037,7 @@ gcc-profile-make:

gcc-profile-use:
$(MAKE) ARCH=$(ARCH) COMP=$(COMP) \
EXTRACXXFLAGS='-fprofile-use=profdir -fno-peel-loops -fno-tracer' \
EXTRACXXFLAGS='-fprofile-use=profdir -fno-peel-loops -fno-tracer -fprofile-correction' \
EXTRACXXFLAGS+=$(EXTRAPROFILEFLAGS) \
EXTRALDFLAGS='-lgcov' \
all
Expand Down
11 changes: 0 additions & 11 deletions src/main_gen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8725,17 +8725,6 @@ Value Search::Worker::search(
? ss->staticEval > (ss - 2)->staticEval
: (ss - 4)->staticEval != VALUE_NONE && ss->staticEval > (ss - 4)->staticEval;

// Step 7. Razoring (~1 Elo)
// If eval is really low check with qsearch if it can exceed alpha, if it can't,
// return a fail low.
// Adjust razor margin according to cutoffCnt. (~1 Elo)
if (eval < alpha - 438 - (332 - 154 * ((ss + 1)->cutoffCnt > 3)) * depth * depth)
{
value = qsearch<NonPV>(pos, ss, alpha - 1, alpha);
if (value < alpha)
return value;
}

// Step 8. Futility pruning: child node (~40 Elo)
// The depth condition is important for mate finding.
if (!ss->ttPv && depth < 11
Expand Down

0 comments on commit d405e26

Please sign in to comment.