-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
✨ New bit benchmarks to go with the paper!
- Loading branch information
Showing
37 changed files
with
3,750 additions
and
530 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,3 +10,4 @@ CMakeSettings.json | |
|
||
/main.cpp | ||
/*.hex | ||
__pycache__/ |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# ============================================================================= | ||
# | ||
# ztd.idk | ||
# Copyright © 2021 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Contact: opensource@soasis.org | ||
# | ||
# Commercial License Usage | ||
# Licensees holding valid commercial ztd.idk licenses may use this file in | ||
# accordance with the commercial license agreement provided with the | ||
# Software or, alternatively, in accordance with the terms contained in | ||
# a written agreement between you and Shepherd's Oasis, LLC. | ||
# For licensing terms and conditions see your agreement. For | ||
# further information contact opensource@soasis.org. | ||
# | ||
# Apache License Version 2 Usage | ||
# Alternatively, this file may be used under the terms of Apache License | ||
# Version 2.0 (the "License") for non-commercial use; you may not use this | ||
# file except in compliance with the License. You may obtain a copy of the | ||
# License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# ============================================================================> | ||
|
||
# # Dependencies | ||
# google benchmark | ||
if (NOT TARGET benchmark) | ||
FetchContent_Declare( | ||
google_benchmark | ||
GIT_REPOSITORY https://github.com/google/benchmark.git | ||
GIT_TAG fd258bbd131552beb2483b960a5e4b69553fdacf | ||
) | ||
# Benchmark variables, internal setup | ||
set(BENCHMARK_ENABLE_EXCEPTIONS ON) | ||
set(BENCHMARK_ENABLE_TESTING OFF) | ||
set(BENCHMARK_DOWNLOAD_DEPENDENCIES OFF) | ||
set(BENCHMARK_ENABLE_GTEST_TESTS OFF) | ||
set(BENCHMARK_ENABLE_GTEST_TESTS OFF) | ||
set(BENCHMARK_ENABLE_WERROR OFF) | ||
set(BENCHMARK_FORCE_WERROR OFF) | ||
|
||
FetchContent_MakeAvailable(google_benchmark) | ||
endif() | ||
|
||
# # Benchmarks | ||
# Bit benchmarks | ||
add_subdirectory(bit) | ||
# # Benchmark Tools | ||
add_subdirectory(tools) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# ============================================================================= | ||
# | ||
# ztd.idk | ||
# Copyright © 2021 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Contact: opensource@soasis.org | ||
# | ||
# Commercial License Usage | ||
# Licensees holding valid commercial ztd.idk licenses may use this file in | ||
# accordance with the commercial license agreement provided with the | ||
# Software or, alternatively, in accordance with the terms contained in | ||
# a written agreement between you and Shepherd's Oasis, LLC. | ||
# For licensing terms and conditions see your agreement. For | ||
# further information contact opensource@soasis.org. | ||
# | ||
# Apache License Version 2 Usage | ||
# Alternatively, this file may be used under the terms of Apache License | ||
# Version 2.0 (the "License") for non-commercial use; you may not use this | ||
# file except in compliance with the License. You may obtain a copy of the | ||
# License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# ============================================================================> | ||
|
||
# # Dependencies | ||
# opaque library | ||
add_subdirectory(opaque) | ||
|
||
# # Benchmark Executable | ||
file(GLOB_RECURSE ztd.idk.benchmarks.bit.sources CONFIGURE_DEPENDS source/**) | ||
|
||
add_executable(ztd.idk.benchmarks.bit ${ztd.idk.benchmarks.bit.sources}) | ||
target_include_directories(ztd.idk.benchmarks.bit PRIVATE | ||
include | ||
) | ||
target_link_libraries(ztd.idk.benchmarks.bit PRIVATE | ||
ztd::idk | ||
ztd::idk::benchmarks::opaque | ||
benchmark | ||
${CMAKE_DL_LIBS} | ||
) | ||
|
||
target_compile_options(ztd.idk.benchmarks.bit | ||
PRIVATE | ||
${--utf8-literal-encoding} | ||
${--utf8-source-encoding} | ||
${--disable-permissive} | ||
${--warn-pedantic} | ||
${--warn-default} | ||
${--warn-extra} | ||
${--warn-errors} | ||
${--allow-microsoft-enum-value} | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"name": "bit", | ||
"scale": { | ||
"type": "relative", | ||
"to": "base" | ||
}, | ||
"categories": [ | ||
{ | ||
"name": "find", | ||
"pattern": "find_", | ||
"ascending": true | ||
}, | ||
{ | ||
"name": "count", | ||
"pattern": "count_", | ||
"ascending": true | ||
}, | ||
{ | ||
"name": "is_sorted_until", | ||
"pattern": "is_sorted_until_", | ||
"ascending": true | ||
}, | ||
{ | ||
"name": "is_sorted", | ||
"pattern": "is_sorted_", | ||
"exclude": "_until_", | ||
"ascending": true | ||
} | ||
], | ||
"data_labels": [ | ||
{ | ||
"name": "real time", | ||
"id": "real_time", | ||
"format": "clock", | ||
"primary": true | ||
}, | ||
{ | ||
"name": "cpu time", | ||
"id": "cpu_time", | ||
"format": "clock" | ||
} | ||
], | ||
"remove_suffixes": [ | ||
",", | ||
"_" | ||
], | ||
"remove_prefixes": [ | ||
",", | ||
"_" | ||
], | ||
"sources": [ | ||
{ | ||
"prefix": "libc++", | ||
"file": "libc++.ztd.idk.benchmarks.bit.json", | ||
"required": false | ||
}, | ||
{ | ||
"prefix": "libstdc++", | ||
"file": "libstdc++.ztd.idk.benchmarks.bit.json", | ||
"required": false | ||
}, | ||
{ | ||
"prefix": "vc++", | ||
"file": "vc++.ztd.idk.benchmarks.bit.json", | ||
"required": false | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
# ============================================================================= | ||
# | ||
# ztd.idk | ||
# Copyright © 2021 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
# Contact: opensource@soasis.org | ||
# | ||
# Commercial License Usage | ||
# Licensees holding valid commercial ztd.idk licenses may use this file in | ||
# accordance with the commercial license agreement provided with the | ||
# Software or, alternatively, in accordance with the terms contained in | ||
# a written agreement between you and Shepherd's Oasis, LLC. | ||
# For licensing terms and conditions see your agreement. For | ||
# further information contact opensource@soasis.org. | ||
# | ||
# Apache License Version 2 Usage | ||
# Alternatively, this file may be used under the terms of Apache License | ||
# Version 2.0 (the "License") for non-commercial use; you may not use this | ||
# file except in compliance with the License. You may obtain a copy of the | ||
# License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
# ============================================================================> | ||
|
||
# # Opaque Library | ||
file(GLOB_RECURSE ztd.idk.benchmarks.opaque.sources | ||
CONFIGURE_DEPENDS | ||
source/**.cpp source/**.c) | ||
|
||
add_library(ztd.idk.benchmarks.opaque SHARED ${ztd.idk.benchmarks.opaque.sources}) | ||
add_library(ztd::idk::benchmarks::opaque ALIAS ztd.idk.benchmarks.opaque) | ||
target_include_directories(ztd.idk.benchmarks.opaque | ||
PUBLIC | ||
include/ | ||
) | ||
target_link_libraries(ztd.idk.benchmarks.opaque PRIVATE | ||
ztd::idk | ||
${CMAKE_DL_LIBS} | ||
) | ||
target_compile_definitions(ztd.idk.benchmarks.opaque | ||
PRIVATE | ||
ZTD_OPAQUE_BUILD=1 | ||
) | ||
target_compile_definitions(ztd.idk.benchmarks.opaque | ||
PUBLIC | ||
ZTD_OPAQUE_DLL=1 | ||
) | ||
target_compile_options(ztd.idk.benchmarks.opaque PRIVATE | ||
${--utf8-literal-encoding} | ||
${--utf8-source-encoding} | ||
${--disable-permissive} | ||
${--warn-pedantic} | ||
${--warn-default} | ||
${--warn-extra} | ||
${--warn-errors} | ||
) |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
// ============================================================================= | ||
// | ||
// ztd.idk | ||
// Copyright © 2021 JeanHeyd "ThePhD" Meneide and Shepherd's Oasis, LLC | ||
// Contact: opensource@soasis.org | ||
// | ||
// Commercial License Usage | ||
// Licensees holding valid commercial ztd.idk licenses may use this file in | ||
// accordance with the commercial license agreement provided with the | ||
// Software or, alternatively, in accordance with the terms contained in | ||
// a written agreement between you and Shepherd's Oasis, LLC. | ||
// For licensing terms and conditions see your agreement. For | ||
// further information contact opensource@soasis.org. | ||
// | ||
// Apache License Version 2 Usage | ||
// Alternatively, this file may be used under the terms of Apache License | ||
// Version 2.0 (the "License") for non-commercial use; you may not use this | ||
// file except in compliance with the License. You may obtain a copy of the | ||
// License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// | ||
// ============================================================================> | ||
|
||
#ifndef ZTD_IDK_BENCHMARKS_OPAQUE_OPAQUE_HPP | ||
#define ZTD_IDK_BENCHMARKS_OPAQUE_OPAQUE_HPP | ||
|
||
#pragma once | ||
|
||
#include <opaque/version.hpp> | ||
|
||
#include <cstddef> | ||
|
||
ZTD_OPAQUE_API_LINKAGE_I_ std::size_t opaque_benchmark_loop_limit(void) ZTD_NOEXCEPT_IF_CXX_I_; | ||
|
||
ZTD_OPAQUE_API_LINKAGE_I_ std::size_t opaque_hardcoded_index(void) ZTD_NOEXCEPT_IF_CXX_I_; | ||
|
||
ZTD_OPAQUE_API_LINKAGE_I_ bool opaque_true(void) ZTD_NOEXCEPT_IF_CXX_I_; | ||
|
||
ZTD_OPAQUE_API_LINKAGE_I_ bool opaque_false(void) ZTD_NOEXCEPT_IF_CXX_I_; | ||
|
||
#endif // ZTD_IDK_BENCHMARKS_OPAQUE_OPAQUE_HPP |
Oops, something went wrong.