Skip to content

Added zpp_bits performance benchmark. #2

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build-linux-clang.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:

- name: "Setup clang"
uses: egor-tensin/setup-clang@v1
with:
version: 12

- name: "Setup cmake"
run: cmake --version
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/build-linux-gcc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ jobs:

- name: "Setup gcc"
uses: egor-tensin/setup-gcc@v1
with:
version: 11

- name: "Setup cmake"
run: cmake --version
Expand Down
1 change: 1 addition & 0 deletions .gitlinks
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ CppCommon modules/CppCommon https://github.com/chronoxor/CppCommon.git master
flatbuffers modules/flatbuffers https://github.com/google/flatbuffers.git master
protobuf modules/protobuf https://github.com/google/protobuf.git 21.x
rapidjson modules/rapidjson https://github.com/miloyip/rapidjson.git master
zpp_bits modules/zpp_bits https://github.com/eyalz800/zpp_bits.git v4.4.11

# Scripts
build build https://github.com/chronoxor/CppBuildScripts.git master
Expand Down
21 changes: 18 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ endif()
# CMake module path
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")

# C++20
set(CMAKE_CXX_STANDARD 20)

# Compiler features
include(SetCompilerFeatures)
include(SetCompilerWarnings)
Expand Down Expand Up @@ -162,7 +165,11 @@ if(NOT CPPSERIALIZATION_MODULE)
string(REGEX REPLACE "(.*)\\.cpp" "\\1" EXAMPLE_NAME ${EXAMPLE_SOURCE_FILE})
set(EXAMPLE_TARGET "cppserialization-example-${EXAMPLE_NAME}")
add_executable(${EXAMPLE_TARGET} ${EXAMPLE_HEADER_FILES} ${EXAMPLE_INLINE_FILES} "examples/${EXAMPLE_SOURCE_FILE}")
set_target_properties(${EXAMPLE_TARGET} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}" FOLDER "examples")
if(MSVC)
set_target_properties(${EXAMPLE_TARGET} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}" FOLDER "examples")
else()
set_target_properties(${EXAMPLE_TARGET} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-shadow" FOLDER "examples")
endif()
target_link_libraries(${EXAMPLE_TARGET} ${LINKLIBS})
list(APPEND INSTALL_TARGETS ${EXAMPLE_TARGET})
list(APPEND INSTALL_TARGETS_PDB ${EXAMPLE_TARGET})
Expand All @@ -176,7 +183,11 @@ if(NOT CPPSERIALIZATION_MODULE)
string(REGEX REPLACE "(.*)\\.cpp" "\\1" BENCHMARK_NAME ${BENCHMARK_SOURCE_FILE})
set(BENCHMARK_TARGET "cppserialization-performance-${BENCHMARK_NAME}")
add_executable(${BENCHMARK_TARGET} ${BENCHMARK_HEADER_FILES} ${BENCHMARK_INLINE_FILES} "performance/${BENCHMARK_SOURCE_FILE}")
set_target_properties(${BENCHMARK_TARGET} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}" FOLDER "performance")
if(MSVC)
set_target_properties(${BENCHMARK_TARGET} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}" FOLDER "performance")
else()
set_target_properties(${BENCHMARK_TARGET} PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-shadow" FOLDER "performance")
endif()
target_link_libraries(${BENCHMARK_TARGET} ${LINKLIBS} cppbenchmark)
list(APPEND INSTALL_TARGETS ${BENCHMARK_TARGET})
list(APPEND INSTALL_TARGETS_PDB ${BENCHMARK_TARGET})
Expand All @@ -187,7 +198,11 @@ if(NOT CPPSERIALIZATION_MODULE)
file(GLOB TESTS_INLINE_FILES "tests/*.inl")
file(GLOB TESTS_SOURCE_FILES "tests/*.cpp")
add_executable(cppserialization-tests ${TESTS_HEADER_FILES} ${TESTS_INLINE_FILES} ${TESTS_SOURCE_FILES} ${Catch2})
set_target_properties(cppserialization-tests PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}" FOLDER "tests")
if (MSVC)
set_target_properties(cppserialization-tests PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS}" FOLDER "tests")
else()
set_target_properties(cppserialization-tests PROPERTIES COMPILE_FLAGS "${PEDANTIC_COMPILE_FLAGS} -Wno-shadow" FOLDER "tests")
endif()
target_include_directories(cppserialization-tests PRIVATE ${Catch2})
target_link_libraries(cppserialization-tests ${LINKLIBS})
list(APPEND INSTALL_TARGETS cppserialization-tests)
Expand Down
88 changes: 88 additions & 0 deletions documents/html/annotated.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>CppSerialization: Class List</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">CppSerialization
&#160;<span id="projectnumber">1.0.2.0</span>
</div>
<div id="projectbrief">C++ Serialization Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
initMenu('',true,false,'search.php','Search');
$(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
<div class="headertitle">
<div class="title">Class List</div> </div>
</div><!--header-->
<div class="contents">
<div class="textblock">Here are the classes, structs, unions and interfaces with brief descriptions:</div><div class="directory">
<div class="levels">[detail level <span onclick="javascript:toggleLevel(1);">1</span><span onclick="javascript:toggleLevel(2);">2</span><span onclick="javascript:toggleLevel(3);">3</span>]</div><table class="directory">
<tr id="row_0_" class="even"><td class="entry"><span style="width:0px;display:inline-block;">&#160;</span><span id="arr_0_" class="arrow" onclick="toggleFolder('0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespace_cpp_serialization.html" target="_self">CppSerialization</a></td><td class="desc">C++ Serialization project definitions </td></tr>
<tr id="row_0_0_"><td class="entry"><span style="width:16px;display:inline-block;">&#160;</span><span id="arr_0_0_" class="arrow" onclick="toggleFolder('0_0_')">&#9660;</span><span class="icona"><span class="icon">N</span></span><a class="el" href="namespace_cpp_serialization_1_1_j_s_o_n.html" target="_self">JSON</a></td><td class="desc"><a class="el" href="namespace_cpp_serialization_1_1_j_s_o_n.html" title="JSON definitions.">JSON</a> definitions </td></tr>
<tr id="row_0_0_0_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_cpp_serialization_1_1_j_s_o_n_1_1_deserializer.html" target="_self">Deserializer</a></td><td class="desc"><a class="el" href="namespace_cpp_serialization_1_1_j_s_o_n.html" title="JSON definitions.">JSON</a> deserializer </td></tr>
<tr id="row_0_0_1_"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_cpp_serialization_1_1_j_s_o_n_1_1_parser.html" target="_self">Parser</a></td><td class="desc"><a class="el" href="namespace_cpp_serialization_1_1_j_s_o_n.html" title="JSON definitions.">JSON</a> parser </td></tr>
<tr id="row_0_0_2_" class="even"><td class="entry"><span style="width:48px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_cpp_serialization_1_1_j_s_o_n_1_1_serializer.html" target="_self">Serializer</a></td><td class="desc"><a class="el" href="namespace_cpp_serialization_1_1_j_s_o_n.html" title="JSON definitions.">JSON</a> serializer </td></tr>
<tr id="row_0_1_"><td class="entry"><span style="width:32px;display:inline-block;">&#160;</span><span class="icona"><span class="icon">C</span></span><a class="el" href="class_cpp_serialization_1_1_serialization_exception.html" target="_self">SerializationException</a></td><td class="desc">Serialization exception </td></tr>
</table>
</div><!-- directory -->
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.17
</small></address>
</body>
</html>
Binary file added documents/html/bc_s.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added documents/html/bdwn.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading