Swappable #515
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Perf GCC | |
on: [push, pull_request] | |
jobs: | |
build-and-test: | |
strategy: | |
matrix: | |
include: | |
- type: 'unordered_map' | |
gcc_ver: '14' | |
- type: 'unordered_map_open' | |
gcc_ver: '14' | |
- type: 'map' | |
gcc_ver: '14' | |
- type: 'data_table_static' | |
gcc_ver: '14' | |
runs-on: ubuntu-24.04 | |
steps: | |
- name: Checkout hash-table-shootout | |
uses: actions/checkout@v4 | |
with: | |
repository: 'morzhovets/hash-table-shootout' | |
ref: 'regress' | |
- name: Checkout momo_v3_2 | |
uses: actions/checkout@v4 | |
with: | |
repository: 'morzhovets/momo' | |
ref: 'v3.2' | |
path: 'momo_v3_2' | |
- name: Checkout momo_v3_5 | |
uses: actions/checkout@v4 | |
with: | |
repository: 'morzhovets/momo' | |
ref: 'v3.5' | |
path: 'momo_v3_5' | |
- name: Checkout momo_v3_7 | |
uses: actions/checkout@v4 | |
with: | |
repository: 'morzhovets/momo' | |
ref: 'v3.7' | |
path: 'momo_v3_7' | |
- name: Checkout momo_v3_10 | |
uses: actions/checkout@v4 | |
with: | |
repository: 'morzhovets/momo' | |
ref: 'v3.10' | |
path: 'momo_v3_10' | |
- name: Checkout momo_cur | |
uses: actions/checkout@v4 | |
with: | |
path: 'momo_cur' | |
- name: Install GCC | |
run: sudo apt install g++-${{ matrix.gcc_ver }} | |
- name: Build | |
run: | | |
mkdir build | |
g++-${{ matrix.gcc_ver }} -Imomo_v3_2 -O3 -DNDEBUG -march=native -std=c++17 -o build/momo_${{ matrix.type }}_1 src/momo_${{ matrix.type }}.cc | |
g++-${{ matrix.gcc_ver }} -Imomo_v3_5 -O3 -DNDEBUG -march=native -std=c++17 -o build/momo_${{ matrix.type }}_2 src/momo_${{ matrix.type }}.cc | |
g++-${{ matrix.gcc_ver }} -Imomo_v3_7 -O3 -DNDEBUG -march=native -std=c++17 -o build/momo_${{ matrix.type }}_3 src/momo_${{ matrix.type }}.cc | |
g++-${{ matrix.gcc_ver }} -Imomo_v3_10/include -O3 -DNDEBUG -march=native -std=c++17 -o build/momo_${{ matrix.type }}_4 src/momo_${{ matrix.type }}.cc | |
g++-${{ matrix.gcc_ver }} -Imomo_cur/include -O3 -DNDEBUG -march=native -std=c++23 -o build/momo_${{ matrix.type }}_0 src/momo_${{ matrix.type }}.cc | |
- name: Test | |
run: | | |
sudo nice -n-20 ionice -c1 -n0 sudo -u $USER python3 momo_${{ matrix.type }}.py |