Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save 5 bytes for free #95

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Save 5 bytes for free #95

wants to merge 2 commits into from

Conversation

jazzzooo
Copy link

No description provided.

@GediminasMasaitis
Copy link
Collaborator

GediminasMasaitis commented Dec 22, 2022

The 4ku code is formatted using clang-format, the includes are ordered alphabetically by clang-format. Running the formatter would simply undo these changes.

@kz04px
Copy link
Owner

kz04px commented Dec 22, 2022

clang-format can be enabled or disabled as follows:

// clang-format off
...
// clang-format on

If you add these comments around your includes, they will be left in the order you specify.

Please note that since creating your PR, another has been merged. You'll have to rebase or merge master to fix the conflicts.

gcp added a commit to gcp/4ku that referenced this pull request Dec 23, 2022
To make it easier to make the tournament deadline.

* Bad bishop eval (kz04px#56).
* Late move pruning changes (kz04px#78).
* Improving variable (kz04px#83).
* Include promotions in qsearch (kz04px#97).

Also include kz04px#95 to make this exactly 4096 bytes,
and put in tournament settings (hash/threads) that
keep the size at exactly that.

vs master (432c06a):

ELO   | 18.58 +- 9.34 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=64MB
LLR   | 2.97 (-2.94, 2.94) [0.00, 5.00]
GAMES | N: 3032 W: 945 L: 783 D: 1304
gcp added a commit to gcp/4ku that referenced this pull request Dec 23, 2022
To make it easier to make the tournament deadline.

* Bad bishop eval (kz04px#56).
* Late move pruning changes (kz04px#78).
* Improving variable (kz04px#83).
* Include promotions in qsearch (kz04px#97).

Also include kz04px#95 to make this exactly 4096 bytes,
and put in tournament settings (hash/threads) that
keep the size at exactly that.

vs master (432c06a):

ELO   | 18.58 +- 9.34 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=64MB
LLR   | 2.97 (-2.94, 2.94) [0.00, 5.00]
GAMES | N: 3032 W: 945 L: 783 D: 1304
gcp added a commit to gcp/4ku that referenced this pull request Dec 23, 2022
To make it easier to make the tournament deadline.

* Bad bishop eval (kz04px#56).
* Late move pruning changes (kz04px#78).
* Improving variable (kz04px#83).
* Include promotions in qsearch (kz04px#97).

Also include kz04px#95 to make this exactly 4096 bytes,
and put in tournament settings (hash/threads) that
keep the size below target.

vs master (432c06a):

ELO   | 18.58 +- 9.34 (95%)
SPRT  | 8.0+0.08s Threads=1 Hash=64MB
LLR   | 2.97 (-2.94, 2.94) [0.00, 5.00]
GAMES | N: 3032 W: 945 L: 783 D: 1304
@jazzzooo
Copy link
Author

Sorry for the late response and merry christmas! I see that this is already merged into this fork, so I wont change anything here for now. Note that compression is unpredictable so run this optimization last. If there is time before the competition you can test if more can be saved, here's the code I used to brute-force the order (I'm sure there's a smarter way to do this):

random.shuffle(headers)
open("test", "wb").write(b"\n".join(headers+main))
score = int(os.popen("lzma -kc9 test | wc -c").read().strip())

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants