├── .gitignore ├── .travis.yml ├── CMakeLists.txt ├── LICENSE_1_0.txt ├── README.md ├── benchmark_boost_geometry.cpp ├── benchmark_spatialindex.cpp ├── bin └── ci │ ├── before_install.sh │ ├── common.sh │ └── script.sh ├── cmake └── modules │ └── FindSpatialIndex.cmake ├── configure.bat ├── configure.sh ├── high_resolution_timer.hpp ├── results.txt ├── results ├── 1 │ ├── README.md │ ├── benchmark_rtree_load_blk_vs_balancing.png │ ├── benchmark_rtree_load_blk_vs_balancing.svg │ ├── benchmark_rtree_load_itr_vs_blk.png │ ├── benchmark_rtree_load_itr_vs_blk.svg │ ├── benchmark_rtree_load_itr_vs_blk_bgi.png │ ├── benchmark_rtree_load_itr_vs_blk_bgi.svg │ ├── benchmark_rtree_load_itr_vs_blk_lsi.png │ ├── benchmark_rtree_load_itr_vs_blk_lsi.svg │ ├── benchmark_rtree_query_blk_vs_balancing.png │ ├── benchmark_rtree_query_blk_vs_balancing.svg │ ├── benchmark_rtree_query_itr_vs_blk.png │ ├── benchmark_rtree_query_itr_vs_blk.svg │ ├── benchmark_rtree_query_itr_vs_blk_bgi.png │ ├── benchmark_rtree_query_itr_vs_blk_lsi.png │ ├── bgi_linear.dat │ ├── bgi_linear_blk.dat │ ├── bgi_quadratic.dat │ ├── bgi_quadratic_blk.dat │ ├── bgi_rstar.dat │ ├── bgi_rstar_blk.dat │ ├── lsi_linear.dat │ ├── lsi_linear_blk.dat │ ├── lsi_quadratic.dat │ ├── lsi_quadratic_blk.dat │ ├── lsi_rstar.dat │ └── lsi_rstar_blk.dat ├── 2 │ ├── benchmark_rtree_load_blk_vs_balancing.png │ ├── benchmark_rtree_load_itr_vs_blk.png │ ├── benchmark_rtree_load_itr_vs_blk_bgi.png │ ├── benchmark_rtree_load_itr_vs_blk_lsi.png │ ├── benchmark_rtree_query_blk_vs_balancing.png │ ├── benchmark_rtree_query_itr_vs_blk.png │ ├── benchmark_rtree_query_itr_vs_blk_bgi.png │ ├── benchmark_rtree_query_itr_vs_blk_lsi.png │ ├── bgi_linear.dat │ ├── bgi_linear_blk.dat │ ├── bgi_quadratic.dat │ ├── bgi_quadratic_blk.dat │ ├── bgi_rstar.dat │ ├── bgi_rstar_blk.dat │ ├── lsi_linear.dat │ ├── lsi_linear_blk.dat │ ├── lsi_quadratic.dat │ ├── lsi_quadratic_blk.dat │ ├── lsi_rstar.dat │ └── lsi_rstar_blk.dat └── plot_results.plt ├── run_benchmark.bat ├── run_benchmark.sh └── spatial_index_benchmark.hpp /.gitignore: -------------------------------------------------------------------------------- 1 | tmp 2 | 3 | # Compiled Object files 4 | *.slo 5 | *.lo 6 | *.o 7 | 8 | # Compiled Dynamic libraries 9 | *.so 10 | *.dylib 11 | 12 | # Compiled Static libraries 13 | *.lai 14 | *.la 15 | *.a 16 | 17 | # Build directories 18 | _build* 19 | build* 20 | 21 | # qtcreator 22 | *.config 23 | *.creator* 24 | *.files 25 | *.includes 26 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | # .travis.yml 2 | # Configure Travis CI service for 3 | # http://github.com/mloskot/spatial_index_benchmark 4 | language: cpp 5 | 6 | compiler: 7 | - g++ 8 | - clang 9 | 10 | before_install: ./bin/ci/before_install.sh 11 | script: ./bin/ci/script.sh 12 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | ################################################################################ 2 | # CMake build configuration for spatial_index_benchmark 3 | ################################################################################ 4 | # Copyright (C) 2013 Mateusz Loskot 5 | # 6 | # Distributed under the Boost Software License, Version 1.0. 7 | # (See accompanying file LICENSE_1_0.txt or copy at 8 | # http://www.boost.org/LICENSE_1_0.txt) 9 | ################################################################################ 10 | cmake_minimum_required (VERSION 2.6) 11 | project(spatial_index_benchmark) 12 | 13 | list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules/") 14 | 15 | enable_testing() 16 | 17 | # Set a default build type if none was specified 18 | if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES) 19 | message(STATUS "Setting build type to 'Release' as none was specified.") 20 | set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE) 21 | # Set the possible values of build type for cmake-gui 22 | set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" 23 | "MinSizeRel" "RelWithDebInfo") 24 | endif() 25 | 26 | option(BGI_ENABLE_CT 27 | "Enable compile-time boost::geometry::index::rtree parameters" OFF) 28 | 29 | # Compiler flags 30 | if (MSVC) 31 | add_definitions(-D_CRT_SECURE_NO_DEPRECATE) 32 | add_definitions(-D_CRT_SECURE_NO_WARNINGS) 33 | add_definitions(-D_CRT_NONSTDC_NO_WARNING) 34 | add_definitions(-D_SCL_SECURE_NO_WARNINGS) 35 | 36 | if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") 37 | string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") 38 | else() 39 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W4") 40 | endif() 41 | else() 42 | set(CXX_COMMON_FLAGS "-pedantic -Wpointer-arith -Wcast-align -Wcast-qual") 43 | # "-pedantic -ansi -Wall -Wpointer-arith -Wcast-align -Wcast-qual -Wfloat-equal -Wredundant-decls") 44 | 45 | if(CMAKE_COMPILER_IS_GNUCXX) 46 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC ${CXX_COMMON_FLAGS} -std=c++0x") 47 | elseif("${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" OR "${CMAKE_CXX_COMPILER}" MATCHES "clang") 48 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CXX_COMMON_FLAGS} -std=c++11") 49 | else() 50 | message(FATAL_ERROR "CMake is unable to recognize compilation toolset") 51 | endif() 52 | endif() 53 | 54 | # Dependencies 55 | find_package(Boost 1.54) 56 | if (NOT Boost_FOUND) 57 | message(FATAL_ERROR "Cannot find Boost") 58 | endif() 59 | include_directories(${Boost_INCLUDE_DIRS}) 60 | 61 | find_package(SpatialIndex 1.7.0) 62 | if (NOT SPATIALINDEX_FOUND) 63 | message(FATAL_ERROR "Cannot find SpatialIndex") 64 | endif() 65 | 66 | set(SRC_COMMON 67 | spatial_index_benchmark.hpp 68 | high_resolution_timer.hpp) 69 | 70 | macro(msg T) 71 | message(STATUS "Configuring ${T}") 72 | endmacro() 73 | 74 | if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # do nothing 75 | elseif (CMAKE_HOST_UNIX) 76 | set(EXTRA_LIBS -lrt) 77 | endif() 78 | 79 | ################################################################################ 80 | # benchmark: libspatialindex 81 | set(BSI lsi) 82 | 83 | # choose rtree split algorithm 84 | foreach(split_variant linear quadratic rstar) 85 | string(TOUPPER "${split_variant}" SPLITVARU) 86 | 87 | # choose iterative insertion or bulk loading (Split-Tile-Recurse) 88 | foreach(load_variant itr blk) 89 | string(TOUPPER "${load_variant}" LOADVARU) 90 | 91 | if(${load_variant} STREQUAL "itr") 92 | set(TARGET_BSI ${BSI}_${split_variant}) 93 | else() 94 | set(TARGET_BSI ${BSI}_${split_variant}_${load_variant}) 95 | endif() 96 | 97 | msg(${TARGET_BSI}) 98 | add_executable(${TARGET_BSI} ${SRC_COMMON} benchmark_spatialindex.cpp) 99 | target_link_libraries(${TARGET_BSI} ${EXTRA_LIBS} ${SPATIALINDEX_LIBRARY}) 100 | set_property(TARGET ${TARGET_BSI} APPEND PROPERTY 101 | COMPILE_DEFINITIONS SIBENCH_RTREE_SPLIT_${SPLITVARU}=1) 102 | set_property(TARGET ${TARGET_BSI} APPEND PROPERTY 103 | COMPILE_DEFINITIONS SIBENCH_RTREE_LOAD_${LOADVARU}=1) 104 | add_test(NAME ${TARGET_BSI} CONFIGURATIONS Release COMMAND ${TARGET_BSI}) 105 | set_property(TARGET ${TARGET_BSI} APPEND PROPERTY 106 | INCLUDE_DIRECTORIES ${SPATIALINDEX_INCLUDE_DIR}) 107 | endforeach() 108 | endforeach() 109 | 110 | ################################################################################ 111 | # benchmark: Boost.Geometry 112 | set(BGI bgi) 113 | 114 | # choose tree balancing algorithm 115 | foreach(split_variant linear quadratic rstar) 116 | string(TOUPPER "${split_variant}" SPLITVARU) 117 | 118 | # choose iterative insertion or bulk loading (Split-Tile-Recurse) 119 | foreach(load_variant itr blk) 120 | string(TOUPPER "${load_variant}" LOADVARU) 121 | 122 | set(params_variant rt) 123 | if (BGI_ENABLE_CT) 124 | list(APPEND params_variant ct) 125 | endif() 126 | 127 | # choose between compile-time and run-time parameters 128 | foreach(params_variant ${params_variant}) 129 | string(TOUPPER "${params_variant}" PARAMSVARU) 130 | 131 | if(${load_variant} STREQUAL "itr") 132 | set(TARGET_BGI_BASE ${BGI}_${split_variant}) 133 | else() 134 | set(TARGET_BGI_BASE ${BGI}_${split_variant}_${load_variant}) 135 | endif() 136 | 137 | if (BGI_ENABLE_CT AND ${params_variant} STREQUAL "ct") 138 | set(TARGET_BGI ${TARGET_BGI_BASE}_${params_variant}) 139 | else() 140 | set(TARGET_BGI ${TARGET_BGI_BASE}) 141 | endif() 142 | 143 | msg(${TARGET_BGI}) 144 | add_executable(${TARGET_BGI} ${SRC_COMMON} benchmark_boost_geometry.cpp) 145 | target_link_libraries(${TARGET_BGI} ${EXTRA_LIBS}) 146 | set_property(TARGET ${TARGET_BGI} APPEND PROPERTY 147 | COMPILE_DEFINITIONS SIBENCH_RTREE_SPLIT_${SPLITVARU}=1) 148 | set_property(TARGET ${TARGET_BGI} APPEND PROPERTY 149 | COMPILE_DEFINITIONS SIBENCH_RTREE_LOAD_${LOADVARU}=1) 150 | set_property(TARGET ${TARGET_BGI} APPEND PROPERTY 151 | COMPILE_DEFINITIONS SIBENCH_BGI_RTREE_PARAMS_${PARAMSVARU}=1) 152 | add_test(NAME ${TARGET_BGI} CONFIGURATIONS Release COMMAND ${TARGET_BGI}) 153 | endforeach() 154 | endforeach() 155 | endforeach() 156 | -------------------------------------------------------------------------------- /LICENSE_1_0.txt: -------------------------------------------------------------------------------- 1 | Boost Software License - Version 1.0 - August 17th, 2003 2 | 3 | Permission is hereby granted, free of charge, to any person or organization 4 | obtaining a copy of the software and accompanying documentation covered by 5 | this license (the "Software") to use, reproduce, display, distribute, 6 | execute, and transmit the Software, and to prepare derivative works of the 7 | Software, and to permit third-parties to whom the Software is furnished to 8 | do so, all subject to the following: 9 | 10 | The copyright notices in the Software and this entire statement, including 11 | the above license grant, this restriction and the following disclaimer, 12 | must be included in all copies of the Software, in whole or in part, and 13 | all derivative works of the Software, unless such copies or derivative 14 | works are solely in the form of machine-executable object code generated by 15 | a source language processor. 16 | 17 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 18 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 19 | FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT 20 | SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE 21 | FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, 22 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 23 | DEALINGS IN THE SOFTWARE. 24 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # spatial_index_benchmark 2 | 3 | Simple non-academic performance comparison of available open source 4 | implementations of R-tree spatial index using *linear*, *quadratic and R-star 5 | balancing algorithms as well as bulk loading (Sort-Tile-Recurse or combined methods). 6 | 7 | List of currently measured libraries: 8 | * [Boost.Geometry](http://www.boost.org/libs/geometry/) 9 | * [libspatialindex](http://libspatialindex.github.io) 10 | 11 | More libraries have been suggested, see the GitHub Issues. 12 | 13 | [![Build Status](https://travis-ci.org/mloskot/spatial_index_benchmark.png?branch=master)](https://travis-ci.org/mloskot/spatial_index_benchmark) 14 | 15 | ## Requirements 16 | 17 | * C++11 compiler 18 | * CMake 19 | * Boost headers current SVN trunk which includes required **internal** utilities: 20 | * ```boost/geometry/index/detail/rtree/utilities/statistics.hpp``` - 21 | added in [r84649](https://svn.boost.org/trac/boost/changeset/84649) 22 | * ```boost/geometry/index/detail/rtree/pack_create.hpp``` - 23 | added in [r84720](https://svn.boost.org/trac/boost/changeset/84720) 24 | * [libspatialindex](https://github.com/libspatialindex/libspatialindex) headers 25 | and libraries (for Windows, use [OSGeo4W](http://trac.osgeo.org/osgeo4w/). 26 | 27 | ## Results 28 | 29 | First prototype, API usage and parameters matched as much as I could, 30 | hopefully without major bugs. 31 | 32 | *TODO: explain details* 33 | 34 | Complete set of result logs in [results](results) directory. 35 | 36 | ### Visual C++ 11.0 (32-bit build) 37 | 38 | HW: Intel(R) Xeon(R) CPU E5-2687W 0 @ 3.10GHz, 16 GB RAM; OS: Windows 7 64-bit 39 | SW: Visual Studio 2012 40 | 41 | * Loading times for each of the R-tree construction methods 42 | 43 | ![load libspatialindex](https://raw.github.com/mloskot/spatial_index_benchmark/master/results/2/benchmark_rtree_load_itr_vs_blk_lsi.png) 44 | 45 | ![load boost::geometry](https://raw.github.com/mloskot/spatial_index_benchmark/master/results/2/benchmark_rtree_load_itr_vs_blk_bgi.png) 46 | 47 | * Query times for each of the R-tree construction methods 48 | 49 | ![query libspatialindex](https://raw.github.com/mloskot/spatial_index_benchmark/master/results/2/benchmark_rtree_query_itr_vs_blk_lsi.png) 50 | 51 | ![query boost::geometry](https://raw.github.com/mloskot/spatial_index_benchmark/master/results/2/benchmark_rtree_query_itr_vs_blk_bgi.png) 52 | 53 | ### Legend 54 | ------ 55 | 56 | * ```bgi``` - boost::geometry::index (_rt is dynamic variant: L,Q,R etc. parameters specified at run-time) 57 | * ```lsi``` - libspatialindex 58 | * ```ct``` - Boost.Geometry-only, compile-time specification of rtree parameters 59 | * ```rt``` (or non suffix) - Boost.Geometry-only, run-time specification of rtree parameters 60 | * ```L``` - linear 61 | * ```Q``` - quadratic 62 | * ```R``` - rstar 63 | * ```itr (or no suffix)``` - iterative insertion method of building rtree 64 | * ```blk``` - bulk loading method of building R-tree (Split-Tile-Recurse for ```lsi```, custom algorithm for ```bgi```) 65 | 66 | * insert 1000000 - number of objects small random boxes 67 | * query 100000 - number of instersection-based queries with random boxes 10x larger than those inserted 68 | * stats generated using lsi's API and purposely written visitor for Boost.Geometry (not yet in Boost trunk) 69 | 70 | ## Disclaimer 71 | 72 | This project is driven by curiosity and for my own purposes, with hope to 73 | obtain useful and interesting results, for myself and others too. 74 | I do not have any objective of making ultimate performance shootout. 75 | This is not a rocket science, but a simple set of C++ programs, with likelyhood 76 | of bugs or inconsistencies. Found any, please report. Comments and improvements 77 | are always welcome! 78 | 79 | ## Authors 80 | 81 | * Mateusz Loskot 82 | * Adam Wulkiewicz 83 | 84 | ## License 85 | 86 | Distributed under the Boost Software License, Version 1.0. 87 | See accompanying file LICENSE_1_0.txt or copy at 88 | http://www.boost.org/LICENSE_1_0.txt. 89 | -------------------------------------------------------------------------------- /benchmark_boost_geometry.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2013 Mateusz Loskot 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. 5 | // (See accompanying file LICENSE_1_0.txt or copy 6 | // at http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | #include "spatial_index_benchmark.hpp" 9 | #ifdef SIBENCH_RTREE_LOAD_BLK 10 | #define BOOST_GEOMETRY_INDEX_DETAIL_EXPERIMENTAL 1 11 | #endif 12 | #include 13 | // enable internal debugging utilities 14 | #include 15 | #include 16 | #include 17 | using namespace std; 18 | namespace bg = boost::geometry; 19 | namespace bgi = boost::geometry::index; 20 | 21 | template 22 | void print_statistics(std::ostream& os, std::string const& lib, T const& i) 23 | { 24 | using bgi::detail::rtree::utilities::statistics; 25 | auto const s = statistics(i); 26 | os << sibench::get_banner(lib) 27 | << " stats: levels=" << boost::get<0>(s) 28 | << ", nodes=" << boost::get<1>(s) 29 | << ", leaves=" << boost::get<2>(s) 30 | << ", values=" << boost::get<3>(s) 31 | << ", values_min=" << boost::get<4>(s) 32 | << ", values_max=" << boost::get<5>(s) 33 | << std::endl; 34 | } 35 | 36 | int main() 37 | { 38 | try 39 | { 40 | #ifdef SIBENCH_BGI_RTREE_PARAMS_CT 41 | std::string const lib("bgi_ct"); 42 | #elif SIBENCH_BGI_RTREE_PARAMS_RT 43 | std::string const lib("bgi"); 44 | #else 45 | #error Boost.Geometry rtree parameters variant unknown 46 | #endif 47 | 48 | sibench::print_result_header(std::cout, lib); 49 | 50 | // Generate random objects for indexing 51 | auto const boxes = sibench::generate_boxes(sibench::max_insertions); 52 | 53 | #ifdef SIBENCH_BGI_RTREE_PARAMS_RT 54 | for (std::size_t next_capacity = 2; next_capacity <= sibench::max_capacities; ++next_capacity) 55 | { 56 | double const fill_factor = 0.5; 57 | std::size_t const min_capacity = next_capacity; 58 | std::size_t const max_capacity = std::size_t(std::floor(min_capacity / fill_factor)); 59 | #elif SIBENCH_BGI_RTREE_PARAMS_CT 60 | { 61 | std::size_t const max_capacity = 1024; 62 | std::size_t const min_capacity = 340; 63 | #endif 64 | 65 | typedef bg::model::point point_t; 66 | typedef bg::model::box box_t; 67 | #ifdef SIBENCH_BGI_RTREE_PARAMS_CT 68 | #ifdef SIBENCH_RTREE_SPLIT_LINEAR 69 | typedef bgi::rtree> rtree_t; 70 | #elif SIBENCH_RTREE_SPLIT_QUADRATIC 71 | typedef bgi::rtree> rtree_t; 72 | #else 73 | typedef bgi::rtree> rtree_t; 74 | #endif 75 | 76 | rtree_t rtree; 77 | 78 | #elif SIBENCH_BGI_RTREE_PARAMS_RT 79 | #ifdef SIBENCH_RTREE_SPLIT_LINEAR 80 | typedef bgi::dynamic_linear rtree_parameters_t; 81 | #elif SIBENCH_RTREE_SPLIT_QUADRATIC 82 | typedef bgi::dynamic_quadratic rtree_parameters_t; 83 | #else 84 | typedef bgi::dynamic_rstar rtree_parameters_t; 85 | #endif 86 | typedef bgi::rtree rtree_t; 87 | 88 | rtree_parameters_t rtree_parameters(max_capacity, min_capacity); 89 | rtree_t rtree(rtree_parameters); 90 | 91 | #endif // SIBENCH_BGI_RTREE_PARAMS_RT 92 | 93 | // accumulated results store (load, query) 94 | sibench::result_info load_r; 95 | sibench::result_info query_r; 96 | 97 | load_r.min_capacity = query_r.min_capacity = min_capacity; 98 | load_r.max_capacity = query_r.max_capacity = max_capacity; 99 | 100 | // Benchmark: insert 101 | { 102 | #ifdef SIBENCH_RTREE_LOAD_BLK 103 | typedef std::vector box_values_t; 104 | box_values_t vboxes; 105 | vboxes.reserve(boxes.size()); 106 | for(auto const& box : boxes) 107 | { 108 | point_t p1(std::get<0>(box), std::get<1>(box)); 109 | point_t p2(std::get<2>(box), std::get<3>(box)); 110 | vboxes.emplace_back(p1, p2); 111 | } 112 | 113 | auto const marks = sibench::benchmark("load", 1, vboxes, 114 | #if SIBENCH_BGI_RTREE_PARAMS_CT 115 | [&rtree] (box_values_t const& boxes, std::size_t iterations) 116 | { 117 | rtree = rtree_t(boxes.cbegin(), boxes.cend()); 118 | #else // !SIBENCH_BGI_RTREE_PARAMS_CT 119 | [&rtree, &rtree_parameters] (box_values_t const& boxes, std::size_t iterations) 120 | { 121 | rtree = rtree_t(boxes.cbegin(), boxes.cend(), rtree_parameters); 122 | #endif 123 | ::boost::ignore_unused_variable_warning(iterations); 124 | }); 125 | #else // !SIBENCH_RTREE_LOAD_BLK 126 | auto const marks = sibench::benchmark("load", boxes.size(), boxes, 127 | [&rtree] (sibench::boxes2d_t const& boxes, std::size_t iterations) 128 | { 129 | auto const s = iterations < boxes.size() ? iterations : boxes.size(); 130 | for (size_t i = 0; i < s; ++i) 131 | { 132 | auto const& box = boxes[i]; 133 | point_t p1(std::get<0>(box), std::get<1>(box)); 134 | point_t p2(std::get<2>(box), std::get<3>(box)); 135 | box_t region(p1, p2); 136 | rtree.insert(region); 137 | } 138 | }); 139 | #endif 140 | 141 | load_r.accumulate(marks); 142 | 143 | // debugging 144 | //sibench::print_result(std::cout, lib, marks); 145 | //std::cout << rtree; 146 | //print_statistics(std::cout, lib, rtree); 147 | } 148 | 149 | // Benchmark: query 150 | { 151 | std::size_t query_found = 0; 152 | 153 | auto const marks = sibench::benchmark("query", sibench::max_queries, boxes, 154 | [&rtree, &query_found] (sibench::boxes2d_t const& boxes, std::size_t iterations) 155 | { 156 | std::vector result; 157 | result.reserve(iterations); 158 | 159 | for (std::size_t i = 0; i < iterations; ++i) 160 | { 161 | result.clear(); 162 | auto const& box = boxes[i]; 163 | point_t p1(std::get<0>(box) - 10, std::get<1>(box) - 10); 164 | point_t p2(std::get<2>(box) + 10, std::get<3>(box) + 10); 165 | box_t region(p1, p2); 166 | rtree.query(bgi::intersects(region), std::back_inserter(result)); 167 | query_found += result.size(); 168 | } 169 | }); 170 | 171 | query_r.accumulate(marks); 172 | 173 | // debugging 174 | //sibench::print_result(std::cout, lib, marks); 175 | //sibench::print_query_count(std::cout, lib, query_found); 176 | } 177 | 178 | // single line per run 179 | sibench::print_result(std::cout, lib, load_r, query_r); 180 | 181 | } // for capacity 182 | 183 | return EXIT_SUCCESS; 184 | } 185 | catch (std::exception const& e) 186 | { 187 | std::cerr << e.what() << std::endl; 188 | } 189 | catch (...) 190 | { 191 | std::cerr << "unknown error" << std::endl; 192 | } 193 | return EXIT_FAILURE; 194 | } 195 | -------------------------------------------------------------------------------- /benchmark_spatialindex.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2013 Mateusz Loskot 3 | // 4 | // Distributed under the Boost Software License, Version 1.0. 5 | // (See accompanying file LICENSE_1_0.txt or copy 6 | // at http://www.boost.org/LICENSE_1_0.txt) 7 | // 8 | #include "spatial_index_benchmark.hpp" 9 | #include 10 | using namespace std; 11 | namespace si = SpatialIndex; 12 | 13 | namespace { 14 | void print_statistics(std::ostream& os, std::string const& lib, si::ISpatialIndex const& i) 15 | { 16 | si::IStatistics* pstat = nullptr; 17 | i.getStatistics(&pstat); 18 | std::unique_ptr stat(pstat); 19 | 20 | os << sibench::get_banner(lib) 21 | << " stats: reads=" << stat->getReads() 22 | << ", writes=" << stat->getWrites() 23 | << ", nodes=" << stat->getNumberOfNodes() 24 | << ", ndata=" << stat->getNumberOfData() 25 | << std::endl; 26 | } 27 | 28 | si::RTree::RTreeVariant get_variant() 29 | { 30 | auto const rv = sibench::get_rtree_split_variant().first; 31 | switch(rv) 32 | { 33 | case sibench::rtree_variant::linear: 34 | return si::RTree::RV_LINEAR; 35 | case sibench::rtree_variant::quadratic: 36 | return si::RTree::RV_QUADRATIC; 37 | case sibench::rtree_variant::rstar: 38 | return si::RTree::RV_RSTAR; 39 | default: 40 | throw std::runtime_error("unknown rtree variant"); 41 | }; 42 | } 43 | 44 | struct query_visitor : public si::IVisitor 45 | { 46 | query_visitor() : m_io_index(0), m_io_leaf(0), m_io_found(0) {} 47 | 48 | void visitNode(si::INode const& n) 49 | { 50 | n.isLeaf() ? ++m_io_leaf : ++m_io_index; 51 | } 52 | 53 | void visitData(si::IData const& d) 54 | { 55 | si::IShape* ps = nullptr; 56 | d.getShape(&ps); 57 | std::unique_ptr shape(ps); 58 | ; // use shape 59 | 60 | // Region is represented as array of characters 61 | uint8_t* pd = 0; 62 | uint32_t size = 0; 63 | d.getData(size, &pd); 64 | //std::unique_ptr data(pd); 65 | // use data 66 | //std::string str(reinterpret_cast(pd)); 67 | 68 | //cout << d.getIdentifier() << endl; // ID is query answer 69 | ++m_io_found; 70 | } 71 | 72 | void visitData(std::vector& v) 73 | { 74 | // TODO 75 | assert(!v.empty()); (void)v; 76 | //cout << v[0]->getIdentifier() << " " << v[1]->getIdentifier() << endl; 77 | } 78 | 79 | size_t m_io_index; 80 | size_t m_io_leaf; 81 | size_t m_io_found; 82 | }; 83 | 84 | #ifdef SIBENCH_RTREE_LOAD_BLK 85 | struct data_stream : public si::IDataStream 86 | { 87 | data_stream(sibench::boxes2d_t const& boxes) 88 | : boxes(boxes), next(0), pdnext(nullptr) 89 | { 90 | get_next(); 91 | } 92 | ~data_stream() 93 | { 94 | delete pdnext; 95 | } 96 | 97 | si::IData* getNext() 98 | { 99 | if (!pdnext) return 0; 100 | si::RTree::Data* pcurrent = pdnext; 101 | get_next(); 102 | return pcurrent; 103 | } 104 | 105 | bool hasNext() 106 | { 107 | return pdnext != nullptr; 108 | } 109 | 110 | uint32_t size() 111 | { 112 | return boxes.size(); 113 | } 114 | 115 | void rewind() 116 | { 117 | if (pdnext) 118 | { 119 | delete pdnext; 120 | pdnext = nullptr; 121 | } 122 | next = 0; 123 | } 124 | 125 | void get_next() 126 | { 127 | pdnext = nullptr; 128 | if (next < boxes.size()) 129 | { 130 | auto const& box = boxes[next]; 131 | double low[2] = { std::get<0>(box), std::get<1>(box) }; 132 | double high[2] = { std::get<2>(box), std::get<3>(box) }; 133 | si::Region region(low, high, 2); 134 | si::id_type id(next); 135 | pdnext = new si::RTree::Data(sizeof(double), reinterpret_cast(low), region, id); 136 | ++next; 137 | } 138 | 139 | } 140 | 141 | sibench::boxes2d_t const& boxes; 142 | sibench::boxes2d_t::size_type next; 143 | si::RTree::Data* pdnext; 144 | 145 | private: 146 | data_stream(data_stream const&); /*=delete*/ 147 | data_stream& operator=(data_stream const&); /*=delete*/ 148 | }; 149 | #endif // SIBENCH_RTREE_LOAD_BULK 150 | 151 | } // unnamed namespace 152 | 153 | int main() 154 | { 155 | try 156 | { 157 | std::string const lib("lsi"); 158 | 159 | sibench::print_result_header(std::cout, lib); 160 | 161 | // Generate random objects for indexing 162 | auto const boxes = sibench::generate_boxes(sibench::max_insertions); 163 | 164 | double const fill_factor = 0.5; // default: 0.7 // TODO: does it mean index_capacity * fill_factor? 165 | for (std::size_t next_capacity = 2; next_capacity <= sibench::max_capacities; ++next_capacity) 166 | { 167 | // accumulated results store (load, query) 168 | sibench::result_info load_r; 169 | sibench::result_info query_r; 170 | 171 | // index parameters 172 | std::size_t const min_capacity = next_capacity; 173 | std::size_t const max_capacity = std::size_t(std::floor(min_capacity / fill_factor)); 174 | 175 | load_r.min_capacity = query_r.min_capacity = min_capacity; 176 | load_r.max_capacity = query_r.max_capacity = max_capacity; 177 | 178 | typedef std::array coord_array_t; 179 | si::RTree::RTreeVariant const variant = get_variant(); 180 | uint32_t const index_capacity = max_capacity; // default: 100 181 | uint32_t const leaf_capacity = max_capacity; // default: 100 182 | uint32_t const dimension = 2; 183 | si::id_type index_id; 184 | std::unique_ptr sm(si::StorageManager::createNewMemoryStorageManager()); 185 | 186 | #ifdef SIBENCH_RTREE_LOAD_ITR 187 | std::unique_ptr rtree(si::RTree::createNewRTree(*sm, 188 | fill_factor, index_capacity, leaf_capacity, dimension, variant, index_id)); 189 | 190 | // Benchmark: insert 191 | { 192 | auto const marks = sibench::benchmark("insert", boxes.size(), boxes, 193 | [&rtree] (sibench::boxes2d_t const& boxes, std::size_t iterations) 194 | { 195 | auto const s = iterations < boxes.size() ? iterations : boxes.size(); 196 | for (size_t i = 0; i < s; ++i) 197 | { 198 | auto const& box = boxes[i]; 199 | coord_array_t const p1 = { std::get<0>(box), std::get<1>(box) }; 200 | coord_array_t const p2 = { std::get<2>(box), std::get<3>(box) }; 201 | si::Region region( 202 | si::Point(p1.data(), p1.size()), 203 | si::Point(p2.data(), p2.size())); 204 | si::id_type item_id(i); 205 | rtree->insertData(0, nullptr, region, item_id); 206 | } 207 | }); 208 | 209 | load_r.accumulate(marks); 210 | // debugging 211 | //sibench::print_result(std::cout, lib, marks); 212 | //print_statistics(std::cout, lib, *rtree); 213 | } 214 | #elif SIBENCH_RTREE_LOAD_BLK 215 | std::unique_ptr rtree; 216 | // Benchmark: bulk loading (Split-Tile-Recurse) 217 | { 218 | si::IStorageManager* psm = sm.get(); 219 | auto const marks = sibench::benchmark("insert", boxes.size(), boxes, 220 | [&rtree, &psm, fill_factor, index_capacity, leaf_capacity, dimension, variant, &index_id] (sibench::boxes2d_t const& boxes, std::size_t /*iterations*/) 221 | { 222 | data_stream dstream(boxes); 223 | std::unique_ptr rtree_tmp(si::RTree::createAndBulkLoadNewRTree(si::RTree::BLM_STR, 224 | dstream, *psm, fill_factor, index_capacity, leaf_capacity, dimension, variant, index_id)); 225 | rtree = std::move(rtree_tmp); 226 | }); 227 | 228 | load_r.accumulate(marks); 229 | // debugging 230 | //sibench::print_result(std::cout, lib, marks); 231 | //print_statistics(std::cout, lib, *rtree); 232 | } 233 | #else 234 | #error Unknown rtree loading method 235 | #endif 236 | 237 | // Benchmark: query 238 | { 239 | size_t query_found = 0; 240 | 241 | auto const marks = sibench::benchmark("query", sibench::max_queries, boxes, 242 | [&rtree, &query_found] (sibench::boxes2d_t const& boxes, std::size_t iterations) 243 | { 244 | for (size_t i = 0; i < iterations; ++i) 245 | { 246 | auto const& box = boxes[i]; 247 | coord_array_t const p1 = { std::get<0>(box) - 10, std::get<1>(box) - 10 }; 248 | coord_array_t const p2 = { std::get<2>(box) + 10, std::get<3>(box) + 10 }; 249 | si::Region region( 250 | si::Point(p1.data(), p1.size()), 251 | si::Point(p2.data(), p2.size())); 252 | query_visitor qvisitor; 253 | rtree->intersectsWithQuery(region, qvisitor); 254 | 255 | query_found += qvisitor.m_io_found; 256 | } 257 | }); 258 | 259 | query_r.accumulate(marks); 260 | 261 | // debugging 262 | //sibench::print_result(std::cout, lib, marks); 263 | //sibench::print_query_count(std::cout, lib, query_found); 264 | } 265 | 266 | // single line per run 267 | sibench::print_result(std::cout, lib, load_r, query_r); 268 | 269 | } // for capacity 270 | 271 | return EXIT_SUCCESS; 272 | } 273 | catch (Tools::Exception& e) 274 | { 275 | std::cerr << e.what() << std::endl; 276 | } 277 | catch (std::exception const& e) 278 | { 279 | std::cerr << e.what() << std::endl; 280 | } 281 | catch (...) 282 | { 283 | std::cerr << "unknown error" << std::endl; 284 | } 285 | return EXIT_FAILURE; 286 | } 287 | -------------------------------------------------------------------------------- /bin/ci/before_install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Installs requirements for spatial_index_benchmark 3 | source ./bin/ci/common.sh 4 | echo "$(tmstamp) *** before_install::apt-get starting $(date) ***" 5 | sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 16126D3A3E5C1192 6 | sudo apt-get update -qq 7 | sudo apt-get install -qq libspatialindex-dev subversion 8 | echo "$(tmstamp) *** before_install::apt-get finished $(date) ***" 9 | gcc --version 10 | clang --version 11 | echo "$(tmstamp) *** before_install::svn co boost starting $(date) ***" 12 | # Boost 1.55+ or trunk is required 13 | mkdir -p ${BOOST_PREFIX} 14 | echo "Running svn co ${BOOST_SVN} ${BOOST_HEADERS}" 15 | svn checkout ${BOOST_SVN} ${BOOST_HEADERS} > /dev/null 16 | echo "$(tmstamp) *** before_install::svn co boost finished $(date) ***" 17 | -------------------------------------------------------------------------------- /bin/ci/common.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | if [[ "$TRAVIS" != "true" ]] ; then 3 | echo "Running this script makes no sense outside of travis-ci.org" 4 | exit 1 5 | fi 6 | # Functions 7 | tmstamp() { echo -n "[$(date '+%H:%M:%S')]" ; } 8 | # Environment 9 | NUMTHREADS=4 10 | if [[ -f /sys/devices/system/cpu/online ]]; then 11 | # Calculates 1.5 times physical threads 12 | NUMTHREADS=$(( ( $(cut -f 2 -d '-' /sys/devices/system/cpu/online) + 1 ) * 15 / 10 )) 13 | fi 14 | NUMTHREADS=1 # disable MP 15 | export NUMTHREADS 16 | export BOOST_SVN="http://svn.boost.org/svn/boost/trunk/boost" 17 | export BOOST_PREFIX="${TRAVIS_BUILD_DIR}/trunk" 18 | export BOOST_HEADERS="${TRAVIS_BUILD_DIR}/trunk/boost" 19 | -------------------------------------------------------------------------------- /bin/ci/script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # Builds and runs spatial_index_benchmark 3 | source ./bin/ci/common.sh 4 | mkdir -p _build 5 | cd _build 6 | echo "Calling cmake -DBOOST_PREFIX=${BOOST_PREFIX}" 7 | cmake \ 8 | -DCMAKE_BUILD_TYPE=Release \ 9 | -DBOOST_ROOT=${BOOST_PREFIX} \ 10 | .. 11 | #cmake --build . 12 | make -j ${NUMTHREADS} 13 | 14 | # Benchmarks run takes long time, skip 15 | #ctest -C Release -V --output-on-failure . 16 | -------------------------------------------------------------------------------- /cmake/modules/FindSpatialIndex.cmake: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # CMake module to search for SpatialIndex library 3 | # 4 | # On success, the macro sets the following variables: 5 | # SPATIALINDEX_FOUND = if the library found 6 | # SPATIALINDEX_LIBRARY = full path to the library 7 | # SPATIALINDEX_INCLUDE_DIR = where to find the library headers 8 | # SPATIALINDEX_VERSION = version of library which was found, e.g. "1.4.0" 9 | # 10 | # Copyright (c) 2009 Mateusz Loskot 11 | # 12 | # Redistribution and use is allowed according to the terms of the BSD license. 13 | # For details see the accompanying COPYING-CMAKE-SCRIPTS file. 14 | # 15 | ############################################################################### 16 | 17 | if(SPATIALINDEX_INCLUDE_DIR AND SPATIALINDEX_LIBRARY) 18 | # Already in cache, be silent 19 | set(SPATIALINDEX_FIND_QUIETLY TRUE) 20 | else() 21 | message(STATUS "Searching for SpatialIndex ${SpatialIndex_FIND_VERSION}+ library") 22 | endif() 23 | 24 | if(WIN32) 25 | set(OSGEO4W_IMPORT_LIBRARY spatialindex_i) 26 | if(DEFINED ENV{OSGEO4W_ROOT}) 27 | set(OSGEO4W_ROOT_DIR $ENV{OSGEO4W_ROOT}) 28 | if(NOT SPATIALINDEX_FIND_QUIETLY) 29 | message(STATUS "Trying OSGeo4W using environment variable OSGEO4W_ROOT=$ENV{OSGEO4W_ROOT}") 30 | endif() 31 | else() 32 | set(OSGEO4W_ROOT_DIR c:/OSGeo4W) 33 | if(NOT SPATIALINDEX_FIND_QUIETLY) 34 | message(STATUS "Trying OSGeo4W using default location OSGEO4W_ROOT=${OSGEO4W_ROOT_DIR}") 35 | endif() 36 | endif() 37 | endif() 38 | 39 | find_path(SPATIALINDEX_INCLUDE_DIR 40 | NAMES spatialindex/MVRTree.h 41 | HINTS 42 | ${OSGEO4W_ROOT_DIR}/include 43 | PATHS 44 | ${OSGEO4W_ROOT_DIR}/include 45 | PATH_SUFFIXES spatialindex 46 | DOC "Path to include directory of SpatialIndex library") 47 | 48 | set(SPATIALINDEX_NAMES ${OSGEO4W_IMPORT_LIBRARY} spatialindex) 49 | find_library(SPATIALINDEX_LIBRARY 50 | NAMES ${SPATIALINDEX_NAMES} 51 | PATHS ${OSGEO4W_ROOT_DIR}/lib) 52 | 53 | if (SPATIALINDEX_INCLUDE_DIR) 54 | set(SPATIALINDEX_VERSION 0) 55 | 56 | set(SPATIALINDEX_VERSION_H "${SPATIALINDEX_INCLUDE_DIR}/Version.h") 57 | if(NOT EXISTS ${SPATIALINDEX_VERSION_H}) 58 | set(SPATIALINDEX_VERSION_H "${SPATIALINDEX_INCLUDE_DIR}/spatialindex/Version.h") 59 | endif() 60 | 61 | file(READ ${SPATIALINDEX_VERSION_H} SPATIALINDEX_VERSION_H_CONTENTS) 62 | 63 | if (DEFINED SPATIALINDEX_VERSION_H_CONTENTS) 64 | string(REGEX REPLACE ".*#define[ \t]SIDX_VERSION_MAJOR[ \t]+([0-9]+).*" "\\1" SIDX_VERSION_MAJOR "${SPATIALINDEX_VERSION_H_CONTENTS}") 65 | string(REGEX REPLACE ".*#define[ \t]SIDX_VERSION_MINOR[ \t]+([0-9]+).*" "\\1" SIDX_VERSION_MINOR "${SPATIALINDEX_VERSION_H_CONTENTS}") 66 | string(REGEX REPLACE ".*#define[ \t]SIDX_VERSION_REV[ \t]+([0-9]+).*" "\\1" SIDX_VERSION_REV "${SPATIALINDEX_VERSION_H_CONTENTS}") 67 | 68 | if(NOT ${SIDX_VERSION_MAJOR} MATCHES "[0-9]+") 69 | message(FATAL_ERROR "SpatialIndex version parsing failed for SIDX_VERSION_MAJOR!") 70 | endif() 71 | if(NOT ${SIDX_VERSION_MINOR} MATCHES "[0-9]+") 72 | message(FATAL_ERROR "SpatialIndex version parsing failed for SIDX_VERSION_MINOR!") 73 | endif() 74 | if(NOT ${SIDX_VERSION_REV} MATCHES "[0-9]+") 75 | message(FATAL_ERROR "SpatialIndex version parsing failed for SIDX_VERSION_REV!") 76 | endif() 77 | 78 | set(SPATIALINDEX_VERSION "${SIDX_VERSION_MAJOR}.${SIDX_VERSION_MINOR}.${SIDX_VERSION_REV}" 79 | CACHE INTERNAL "The version string for SpatialIndex library") 80 | 81 | if (SPATIALINDEX_VERSION VERSION_EQUAL SpatialIndex_FIND_VERSION OR 82 | SPATIALINDEX_VERSION VERSION_GREATER SpatialIndex_FIND_VERSION) 83 | if (NOT SPATIALINDEX_FIND_QUIETLY) 84 | message(STATUS "Found SpatialIndex version: ${SPATIALINDEX_VERSION}") 85 | endif() 86 | else() 87 | message(FATAL_ERROR "SpatialIndex version check failed. Version ${SPATIALINDEX_VERSION} was found, at least version ${SpatialIndex_FIND_VERSION} is required") 88 | endif() 89 | else() 90 | message(FATAL_ERROR "Failed to open ${SPATIALINDEX_VERSION_H} file") 91 | endif() 92 | 93 | endif() 94 | 95 | # Handle the QUIETLY and REQUIRED arguments and set SPATIALINDEX_FOUND to TRUE 96 | # if all listed variables are TRUE 97 | include(FindPackageHandleStandardArgs) 98 | find_package_handle_standard_args(SpatialIndex DEFAULT_MSG SPATIALINDEX_LIBRARY SPATIALINDEX_INCLUDE_DIR) 99 | 100 | # TODO: Do we want to mark these as advanced? --mloskot 101 | # http://www.cmake.org/cmake/help/cmake2.6docs.html#command:mark_as_advanced 102 | #MARK_AS_ADVANCED(SPATIALINDEX_LIBRARY SPATIALINDEX_INCLUDE_DIR) 103 | -------------------------------------------------------------------------------- /configure.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | set BLD=_build 3 | IF NOT EXIST %~dp0\CMakeLists.txt GOTO :NOTSRC 4 | IF NOT EXIST %~dp0\%BLD% mkdir %BLD% 5 | pushd _build 6 | cmake -G "Visual Studio 11" ^ 7 | -DBGI_ENABLE_CT=YES ^ 8 | -DBOOST_ROOT=D:\dev\boost\_svn\trunk ^ 9 | .. 10 | popd 11 | GOTO :EOF 12 | 13 | :NOTSRC 14 | echo cannot find sources in '%~dp0' 15 | -------------------------------------------------------------------------------- /configure.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # 3 | # Runs CMake to configure build in Git branch-specific directory, 4 | # allows user to custom configuration. 5 | # 6 | # Copyright (C) 2013 Mateusz Loskot 7 | # 8 | # Uses parts and ideas adapted from Boost's bootstrap.sh script 9 | # Copyright (C) 2005, 2006 Douglas Gregor. 10 | # Copyright (C) 2006 The Trustees of Indiana University 11 | # 12 | # Distributed under the Boost Software License, Version 1.0. 13 | # (See accompanying file LICENSE_1_0.txt or copy at 14 | # http://www.boost.org/LICENSE_1_0.txt) 15 | # 16 | ################################################################################ 17 | err() 18 | { 19 | echo -e "error: $1" 20 | exit 1 21 | } 22 | msg() 23 | { 24 | echo "$1" 25 | } 26 | msg_line() 27 | { 28 | echo -n "$1..." 29 | } 30 | msg_done() 31 | { 32 | if [[ -n "$1" ]]; then 33 | echo "$1" 34 | else 35 | echo "done" 36 | fi 37 | } 38 | # Check source directory 39 | is_src_dir() 40 | { 41 | [[ -f "$1/CMakeLists.txt" ]] 42 | } 43 | # Determine Git branch, if found 44 | function get_git_branch 45 | { 46 | ref=$(cd $SRC_DIR && exec git symbolic-ref HEAD 2> /dev/null) || return 47 | echo "${ref#refs/heads/}" 48 | } 49 | ################################################################################ 50 | PREFIX="" 51 | SRC_DIR="$PWD" 52 | BUILD_DIR="$PWD/_build" 53 | CMAKE_OPTIONS="" 54 | 55 | for option 56 | do 57 | case $option in 58 | 59 | -help | --help | -h) 60 | show_help=yes 61 | ;; 62 | -prefix=* | --prefix=*) 63 | PREFIX=`expr "x$option" : "x-*prefix=\(.*\)"` 64 | ;; 65 | -src-dir=* | --src-dir=*) 66 | SRC_DIR=`expr "x$option" : "x-*src-dir=\(.*\)"` 67 | ;; 68 | -build-dir=* | --build-dir=*) 69 | BUILD_DIR=`expr "x$option" : "x-*build-dir=\(.*\)"` 70 | ;; 71 | -D*) 72 | CMAKE_OPTION=`expr "x$option" : "x\(-D.*\)"` 73 | CMAKE_OPTIONS="${CMAKE_OPTIONS} ${CMAKE_OPTION}" 74 | ;; 75 | -*) 76 | err "unrecognized option: $option" 77 | ;; 78 | 79 | esac 80 | done 81 | if [ "x$show_help" = "xyes" ]; then 82 | cat < 11 | #include 12 | 13 | #if defined(BOOST_HAS_UNISTD_H) 14 | #include 15 | #endif 16 | #include 17 | #include 18 | #include 19 | 20 | #if defined(BOOST_WINDOWS) 21 | 22 | #include 23 | 24 | namespace util 25 | { 26 | /////////////////////////////////////////////////////////////////////////////// 27 | // 28 | // high_resolution_timer 29 | // A timer object measures elapsed time. 30 | // CAUTION: Windows only! 31 | // 32 | /////////////////////////////////////////////////////////////////////////////// 33 | class high_resolution_timer 34 | { 35 | public: 36 | high_resolution_timer() 37 | { 38 | restart(); 39 | } 40 | 41 | high_resolution_timer(double t) 42 | { 43 | LARGE_INTEGER frequency; 44 | if (!QueryPerformanceFrequency(&frequency)) 45 | boost::throw_exception(std::runtime_error("Couldn't acquire frequency")); 46 | 47 | start_time.QuadPart = (LONGLONG)(t * frequency.QuadPart); 48 | } 49 | 50 | high_resolution_timer(high_resolution_timer const& rhs) 51 | : start_time(rhs.start_time) 52 | { 53 | } 54 | 55 | static double now() 56 | { 57 | SYSTEMTIME st; 58 | GetSystemTime(&st); 59 | 60 | FILETIME ft; 61 | SystemTimeToFileTime(&st, &ft); 62 | 63 | LARGE_INTEGER now; 64 | now.LowPart = ft.dwLowDateTime; 65 | now.HighPart = ft.dwHighDateTime; 66 | 67 | // FileTime is in 100ns increments, result needs to be in [s] 68 | return now.QuadPart * 1e-7; 69 | } 70 | 71 | void restart() 72 | { 73 | if (!QueryPerformanceCounter(&start_time)) 74 | boost::throw_exception(std::runtime_error("Couldn't initialize start_time")); 75 | } 76 | double elapsed() const // return elapsed time in seconds 77 | { 78 | LARGE_INTEGER now; 79 | if (!QueryPerformanceCounter(&now)) 80 | boost::throw_exception(std::runtime_error("Couldn't get current time")); 81 | 82 | LARGE_INTEGER frequency; 83 | if (!QueryPerformanceFrequency(&frequency)) 84 | boost::throw_exception(std::runtime_error("Couldn't acquire frequency")); 85 | 86 | return double(now.QuadPart - start_time.QuadPart) / frequency.QuadPart; 87 | } 88 | 89 | double elapsed_max() const // return estimated maximum value for elapsed() 90 | { 91 | LARGE_INTEGER frequency; 92 | if (!QueryPerformanceFrequency(&frequency)) 93 | boost::throw_exception(std::runtime_error("Couldn't acquire frequency")); 94 | 95 | return double((std::numeric_limits::max)() - start_time.QuadPart) / 96 | double(frequency.QuadPart); 97 | } 98 | 99 | double elapsed_min() const // return minimum value for elapsed() 100 | { 101 | LARGE_INTEGER frequency; 102 | if (!QueryPerformanceFrequency(&frequency)) 103 | boost::throw_exception(std::runtime_error("Couldn't acquire frequency")); 104 | 105 | return 1.0 / frequency.QuadPart; 106 | } 107 | 108 | private: 109 | LARGE_INTEGER start_time; 110 | }; 111 | 112 | } // namespace util 113 | 114 | #elif defined(_POSIX_TIMERS) && _POSIX_TIMERS > 0 && defined(_POSIX_THREAD_CPUTIME) 115 | 116 | #if _POSIX_THREAD_CPUTIME > 0 // timer always supported 117 | 118 | namespace util 119 | { 120 | 121 | /////////////////////////////////////////////////////////////////////////////// 122 | // 123 | // high_resolution_timer 124 | // A timer object measures elapsed time. 125 | // 126 | /////////////////////////////////////////////////////////////////////////////// 127 | class high_resolution_timer 128 | { 129 | public: 130 | high_resolution_timer() 131 | { 132 | start_time.tv_sec = 0; 133 | start_time.tv_nsec = 0; 134 | 135 | restart(); 136 | } 137 | 138 | high_resolution_timer(double t) 139 | { 140 | start_time.tv_sec = time_t(t); 141 | start_time.tv_nsec = (t - start_time.tv_sec) * 1e9; 142 | } 143 | 144 | high_resolution_timer(high_resolution_timer const& rhs) 145 | : start_time(rhs.start_time) 146 | { 147 | } 148 | 149 | static double now() 150 | { 151 | timespec now; 152 | if (-1 == clock_gettime(CLOCK_REALTIME, &now)) 153 | boost::throw_exception(std::runtime_error("Couldn't get current time")); 154 | return double(now.tv_sec) + double(now.tv_nsec) * 1e-9; 155 | } 156 | 157 | void restart() 158 | { 159 | if (-1 == clock_gettime(CLOCK_REALTIME, &start_time)) 160 | boost::throw_exception(std::runtime_error("Couldn't initialize start_time")); 161 | } 162 | double elapsed() const // return elapsed time in seconds 163 | { 164 | timespec now; 165 | if (-1 == clock_gettime(CLOCK_REALTIME, &now)) 166 | boost::throw_exception(std::runtime_error("Couldn't get current time")); 167 | 168 | if (now.tv_sec == start_time.tv_sec) 169 | return double(now.tv_nsec - start_time.tv_nsec) * 1e-9; 170 | 171 | return double(now.tv_sec - start_time.tv_sec) + 172 | (double(now.tv_nsec - start_time.tv_nsec) * 1e-9); 173 | } 174 | 175 | double elapsed_max() const // return estimated maximum value for elapsed() 176 | { 177 | return double((std::numeric_limits::max)() - start_time.tv_sec); 178 | } 179 | 180 | double elapsed_min() const // return minimum value for elapsed() 181 | { 182 | timespec resolution; 183 | if (-1 == clock_getres(CLOCK_REALTIME, &resolution)) 184 | boost::throw_exception(std::runtime_error("Couldn't get resolution")); 185 | return double(resolution.tv_sec + resolution.tv_nsec * 1e-9); 186 | } 187 | 188 | private: 189 | timespec start_time; 190 | }; 191 | 192 | } // namespace util 193 | 194 | #else // _POSIX_THREAD_CPUTIME > 0 195 | 196 | #include 197 | 198 | // availability of high performance timers must be checked at runtime 199 | namespace util 200 | { 201 | /////////////////////////////////////////////////////////////////////////////// 202 | // 203 | // high_resolution_timer 204 | // A timer object measures elapsed time. 205 | // 206 | /////////////////////////////////////////////////////////////////////////////// 207 | class high_resolution_timer 208 | { 209 | public: 210 | high_resolution_timer() 211 | : use_backup(sysconf(_SC_THREAD_CPUTIME) <= 0) 212 | { 213 | if (!use_backup) { 214 | start_time.tv_sec = 0; 215 | start_time.tv_nsec = 0; 216 | } 217 | restart(); 218 | } 219 | 220 | high_resolution_timer(double t) 221 | : use_backup(sysconf(_SC_THREAD_CPUTIME) <= 0) 222 | { 223 | if (!use_backup) { 224 | start_time.tv_sec = time_t(t); 225 | start_time.tv_nsec = (t - start_time.tv_sec) * 1e9; 226 | } 227 | } 228 | 229 | high_resolution_timer(high_resolution_timer const& rhs) 230 | : use_backup(sysconf(_SC_THREAD_CPUTIME) <= 0), 231 | start_time(rhs.start_time) 232 | { 233 | } 234 | 235 | static double now() 236 | { 237 | if (sysconf(_SC_THREAD_CPUTIME) <= 0) 238 | return double(std::clock()); 239 | 240 | timespec now; 241 | if (-1 == clock_gettime(CLOCK_REALTIME, &now)) 242 | boost::throw_exception(std::runtime_error("Couldn't get current time")); 243 | return double(now.tv_sec) + double(now.tv_nsec) * 1e-9; 244 | } 245 | 246 | void restart() 247 | { 248 | if (use_backup) 249 | start_time_backup.restart(); 250 | else if (-1 == clock_gettime(CLOCK_REALTIME, &start_time)) 251 | boost::throw_exception(std::runtime_error("Couldn't initialize start_time")); 252 | } 253 | double elapsed() const // return elapsed time in seconds 254 | { 255 | if (use_backup) 256 | return start_time_backup.elapsed(); 257 | 258 | timespec now; 259 | if (-1 == clock_gettime(CLOCK_REALTIME, &now)) 260 | boost::throw_exception(std::runtime_error("Couldn't get current time")); 261 | 262 | if (now.tv_sec == start_time.tv_sec) 263 | return double(now.tv_nsec - start_time.tv_nsec) * 1e-9; 264 | 265 | return double(now.tv_sec - start_time.tv_sec) + 266 | (double(now.tv_nsec - start_time.tv_nsec) * 1e-9); 267 | } 268 | 269 | double elapsed_max() const // return estimated maximum value for elapsed() 270 | { 271 | if (use_backup) 272 | start_time_backup.elapsed_max(); 273 | 274 | return double((std::numeric_limits::max)() - start_time.tv_sec); 275 | } 276 | 277 | double elapsed_min() const // return minimum value for elapsed() 278 | { 279 | if (use_backup) 280 | start_time_backup.elapsed_min(); 281 | 282 | timespec resolution; 283 | if (-1 == clock_getres(CLOCK_REALTIME, &resolution)) 284 | boost::throw_exception(std::runtime_error("Couldn't get resolution")); 285 | return double(resolution.tv_sec + resolution.tv_nsec * 1e-9); 286 | } 287 | 288 | private: 289 | bool use_backup; 290 | timespec start_time; 291 | boost::timer start_time_backup; 292 | }; 293 | 294 | } // namespace util 295 | 296 | #endif // _POSIX_THREAD_CPUTIME > 0 297 | 298 | #else // !defined(BOOST_WINDOWS) && (!defined(_POSIX_TIMERS) 299 | // || _POSIX_TIMERS <= 0 300 | // || !defined(_POSIX_THREAD_CPUTIME) 301 | // || _POSIX_THREAD_CPUTIME <= 0) 302 | 303 | #if defined(BOOST_HAS_GETTIMEOFDAY) 304 | 305 | // For platforms that do not support _POSIX_TIMERS but do have 306 | // GETTIMEOFDAY, which is still preferable to std::clock() 307 | #include 308 | 309 | namespace util 310 | { 311 | 312 | /////////////////////////////////////////////////////////////////////////// 313 | // 314 | // high_resolution_timer 315 | // A timer object measures elapsed time. 316 | // 317 | // Implemented with gettimeofday() for platforms that support it, 318 | // such as Darwin (OS X) but do not support the previous options. 319 | // 320 | // Copyright (c) 2009 Edward Grace 321 | // 322 | /////////////////////////////////////////////////////////////////////////// 323 | class high_resolution_timer 324 | { 325 | private: 326 | template 327 | static inline double unsigned_diff(const U &a, const U &b) 328 | { 329 | if (a > b) 330 | return static_cast(a-b); 331 | return -static_cast(b-a); 332 | } 333 | 334 | // @brief Return the difference between two timeval types. 335 | // 336 | // @param t1 The most recent timeval. 337 | // @param t0 The historical timeval. 338 | // 339 | // @return The difference between the two in seconds. 340 | double elapsed(const timeval &t1, const timeval &t0) const 341 | { 342 | if (t1.tv_sec == t0.tv_sec) 343 | return unsigned_diff(t1.tv_usec,t0.tv_usec) * 1e-6; 344 | 345 | // We do it this way as the result of the difference of the 346 | // microseconds can be negative if the clock is implemented so 347 | // that the seconds timer increases in large steps. 348 | // 349 | // Naive subtraction of the unsigned types and conversion to 350 | // double can wreak havoc! 351 | return unsigned_diff(t1.tv_sec,t0.tv_sec) + 352 | unsigned_diff(t1.tv_usec,t0.tv_usec) * 1e-6; 353 | } 354 | 355 | public: 356 | high_resolution_timer() 357 | { 358 | start_time.tv_sec = 0; 359 | start_time.tv_usec = 0; 360 | 361 | restart(); 362 | } 363 | 364 | high_resolution_timer(double t) 365 | { 366 | start_time.tv_sec = time_t(t); 367 | start_time.tv_usec = (t - start_time.tv_sec) * 1e6; 368 | } 369 | 370 | high_resolution_timer(high_resolution_timer const& rhs) 371 | : start_time(rhs.start_time) 372 | { 373 | } 374 | 375 | static double now() 376 | { 377 | // Under some implementations gettimeofday() will always 378 | // return zero. If it returns anything else however then 379 | // we accept this as evidence of an error. Note we are 380 | // not assuming that -1 explicitly indicates the error 381 | // condition, just that non zero is indicative of the 382 | // error. 383 | timeval now; 384 | if (gettimeofday(&now, NULL)) 385 | boost::throw_exception(std::runtime_error("Couldn't get current time")); 386 | return double(now.tv_sec) + double(now.tv_usec) * 1e-6; 387 | } 388 | 389 | void restart() 390 | { 391 | if (gettimeofday(&start_time, NULL)) 392 | boost::throw_exception(std::runtime_error("Couldn't initialize start_time")); 393 | } 394 | 395 | double elapsed() const // return elapsed time in seconds 396 | { 397 | timeval now; 398 | if (gettimeofday(&now, NULL)) 399 | boost::throw_exception(std::runtime_error("Couldn't get current time")); 400 | return elapsed(now,start_time); 401 | } 402 | 403 | double elapsed_max() const // return estimated maximum value for elapsed() 404 | { 405 | return double((std::numeric_limits::max)() - start_time.tv_sec); 406 | } 407 | 408 | double elapsed_min() const // return minimum value for elapsed() 409 | { 410 | // On systems without an explicit clock_getres or similar 411 | // we can only estimate an upper bound on the resolution 412 | // by repeatedly calling the gettimeofday function. This 413 | // is often likely to be indicative of the true 414 | // resolution. 415 | timeval t0, t1; 416 | double delta(0); 417 | 418 | if (gettimeofday(&t0, NULL)) 419 | boost::throw_exception(std::runtime_error("Couldn't get resolution.")); 420 | 421 | // Spin around in a tight loop until we observe a change 422 | // in the reported timer value. 423 | do { 424 | if (gettimeofday(&t1, NULL)) 425 | boost::throw_exception(std::runtime_error("Couldn't get resolution.")); 426 | delta = elapsed(t1, t0); 427 | } while (delta <= 0.0); 428 | 429 | return delta; 430 | } 431 | 432 | private: 433 | timeval start_time; 434 | }; 435 | 436 | } 437 | 438 | #else // BOOST_HAS_GETTIMEOFDAY 439 | 440 | // For platforms other than Windows or Linux, or not implementing gettimeofday 441 | // simply fall back to boost::timer 442 | #include 443 | 444 | namespace util 445 | { 446 | struct high_resolution_timer 447 | : boost::timer 448 | { 449 | static double now() 450 | { 451 | return double(std::clock()); 452 | } 453 | }; 454 | } 455 | 456 | #endif 457 | 458 | #endif 459 | 460 | #endif // HIGH_RESOLUTION_TIMER_AUG_14_2009_0425PM 461 | 462 | // 463 | // $Log: high_resolution_timer.hpp,v $ 464 | // Revision 1.4 2009/08/14 15:28:10 graceej 465 | // * It is entirely possible for the updating clock to increment the 466 | // * seconds and *decrement* the microseconds field. Consequently 467 | // * when subtracting these unsigned microseconds fields a wrap-around 468 | // * error can occur. For this reason elapsed(t1, t0) is used in a 469 | // * similar maner to cycle.h this preserves the sign of the 470 | // * difference. 471 | // 472 | 473 | 474 | -------------------------------------------------------------------------------- /results/1/README.md: -------------------------------------------------------------------------------- 1 | HW: Intel(R) Xeon(R) CPU E5-2687W 0 @ 3.10GHz, 16 GB RAM; OS: Windows 7 64-bit 2 | SW: Visual Studio 2012 3 | -------------------------------------------------------------------------------- /results/1/benchmark_rtree_load_blk_vs_balancing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/1/benchmark_rtree_load_blk_vs_balancing.png -------------------------------------------------------------------------------- /results/1/benchmark_rtree_load_blk_vs_balancing.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 10 | Gnuplot 11 | Produced by GNUPLOT 4.6 patchlevel 2 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 1 38 | 39 | 40 | 2 41 | 42 | 43 | 3 44 | 45 | 46 | 4 47 | 48 | 49 | 5 50 | 51 | 52 | 6 53 | 54 | 55 | 7 56 | 57 | 58 | 0 59 | 60 | 61 | 20 62 | 63 | 64 | 40 65 | 66 | 67 | 60 68 | 69 | 70 | 80 71 | 72 | 73 | 100 74 | 75 | 76 | 120 77 | 78 | 79 | 140 80 | 81 | 82 | 160 83 | 84 | 85 | 180 86 | 87 | 88 | 200 89 | 90 | 91 | load 1M objects in seconds 92 | 93 | 94 | max capacity (min capacity = max * 0.5) 95 | 96 | 97 | Bulk loading (blk) times not affected by R-tree balancing algorithms 98 | 99 | 100 | gnuplot_plot_1 101 | 102 | 103 | bgi_linear_blk 104 | 105 | 118 | 119 | gnuplot_plot_2 120 | 121 | 122 | bgi_quadratic_blk 123 | 124 | 137 | 138 | gnuplot_plot_3 139 | 140 | 141 | bgi_rstar_blk 142 | 143 | 156 | 157 | gnuplot_plot_4 158 | 159 | 160 | lsi_linear_blk 161 | 162 | 175 | 176 | gnuplot_plot_5 177 | 178 | 179 | lsi_quadratic_blk 180 | 181 | 194 | 195 | gnuplot_plot_6 196 | 197 | 198 | lsi_rstar_blk 199 | 200 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | -------------------------------------------------------------------------------- /results/1/benchmark_rtree_load_itr_vs_blk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/1/benchmark_rtree_load_itr_vs_blk.png -------------------------------------------------------------------------------- /results/1/benchmark_rtree_load_itr_vs_blk_bgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/1/benchmark_rtree_load_itr_vs_blk_bgi.png -------------------------------------------------------------------------------- /results/1/benchmark_rtree_load_itr_vs_blk_bgi.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 10 | Gnuplot 11 | Produced by GNUPLOT 4.6 patchlevel 2 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 0 38 | 39 | 40 | 10 41 | 42 | 43 | 20 44 | 45 | 46 | 30 47 | 48 | 49 | 40 50 | 51 | 52 | 50 53 | 54 | 55 | 60 56 | 57 | 58 | 70 59 | 60 | 61 | 80 62 | 63 | 64 | 90 65 | 66 | 67 | 0 68 | 69 | 70 | 20 71 | 72 | 73 | 40 74 | 75 | 76 | 60 77 | 78 | 79 | 80 80 | 81 | 82 | 100 83 | 84 | 85 | 120 86 | 87 | 88 | 140 89 | 90 | 91 | 160 92 | 93 | 94 | 180 95 | 96 | 97 | 200 98 | 99 | 100 | load 1M objects in seconds 101 | 102 | 103 | max capacity (min capacity = max * 0.5) 104 | 105 | 106 | BGI: Iterative loading using R-tree balancing algorithms vs bulk loading (blk) 107 | 108 | 109 | gnuplot_plot_1 110 | 111 | 112 | bgi_linear 113 | 114 | 127 | 128 | gnuplot_plot_2 129 | 130 | 131 | bgi_quadratic 132 | 133 | 146 | 147 | gnuplot_plot_3 148 | 149 | 150 | bgi_rstar 151 | 152 | 165 | 166 | gnuplot_plot_4 167 | 168 | 169 | bgi_rstar_blk 170 | 171 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | -------------------------------------------------------------------------------- /results/1/benchmark_rtree_load_itr_vs_blk_lsi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/1/benchmark_rtree_load_itr_vs_blk_lsi.png -------------------------------------------------------------------------------- /results/1/benchmark_rtree_load_itr_vs_blk_lsi.svg: -------------------------------------------------------------------------------- 1 | 2 | 4 | 9 | 10 | Gnuplot 11 | Produced by GNUPLOT 4.6 patchlevel 2 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 0 38 | 39 | 40 | 20 41 | 42 | 43 | 40 44 | 45 | 46 | 60 47 | 48 | 49 | 80 50 | 51 | 52 | 100 53 | 54 | 55 | 120 56 | 57 | 58 | 0 59 | 60 | 61 | 20 62 | 63 | 64 | 40 65 | 66 | 67 | 60 68 | 69 | 70 | 80 71 | 72 | 73 | 100 74 | 75 | 76 | 120 77 | 78 | 79 | 140 80 | 81 | 82 | 160 83 | 84 | 85 | 180 86 | 87 | 88 | 200 89 | 90 | 91 | load 1M objects in seconds 92 | 93 | 94 | max capacity (min capacity = max * 0.5) 95 | 96 | 97 | LSI: Iterative loading using R-tree balancing algorithms vs bulk loading (blk) 98 | 99 | 100 | gnuplot_plot_1 101 | 102 | 103 | lsi_linear 104 | 105 | 118 | 119 | gnuplot_plot_2 120 | 121 | 122 | lsi_quadratic 123 | 124 | 137 | 138 | gnuplot_plot_3 139 | 140 | 141 | lsi_rstar 142 | 143 | 156 | 157 | gnuplot_plot_4 158 | 159 | 160 | lsi_rstar_blk 161 | 162 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | -------------------------------------------------------------------------------- /results/1/benchmark_rtree_query_blk_vs_balancing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/1/benchmark_rtree_query_blk_vs_balancing.png -------------------------------------------------------------------------------- /results/1/benchmark_rtree_query_itr_vs_blk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/1/benchmark_rtree_query_itr_vs_blk.png -------------------------------------------------------------------------------- /results/1/benchmark_rtree_query_itr_vs_blk_bgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/1/benchmark_rtree_query_itr_vs_blk_bgi.png -------------------------------------------------------------------------------- /results/1/benchmark_rtree_query_itr_vs_blk_lsi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/1/benchmark_rtree_query_itr_vs_blk_lsi.png -------------------------------------------------------------------------------- /results/1/bgi_linear.dat: -------------------------------------------------------------------------------- 1 | bgi(L,ITR) ----------------------------- 2 | capacity load query 3 | 4 2 1.450958 1.338424 4 | 6 3 1.203885 1.731174 5 | 8 4 1.116287 1.621416 6 | 10 5 1.077351 1.709984 7 | 12 6 1.060911 1.499446 8 | 14 7 1.124238 1.494776 9 | 16 8 1.100487 1.872703 10 | 18 9 1.087297 1.570040 11 | 20 10 1.132558 1.717491 12 | 22 11 1.157733 1.598585 13 | 24 12 1.164033 1.641682 14 | 26 13 1.153308 1.725597 15 | 28 14 1.193715 1.625762 16 | 30 15 1.190367 2.310373 17 | 32 16 1.285847 1.457088 18 | 34 17 1.296601 1.736704 19 | 36 18 1.324990 1.403785 20 | 38 19 1.345580 1.779365 21 | 40 20 1.357678 1.568546 22 | 42 21 1.366910 1.378288 23 | 44 22 1.408800 1.425282 24 | 46 23 1.389558 1.804228 25 | 48 24 1.425396 1.493497 26 | 50 25 1.402919 1.774474 27 | 52 26 1.436188 1.646059 28 | 54 27 1.457687 1.902717 29 | 56 28 1.492415 1.636130 30 | 58 29 1.471054 1.889726 31 | 60 30 1.521187 1.467035 32 | 62 31 1.581413 1.522923 33 | 64 32 1.560103 1.746096 34 | 66 33 1.613970 1.574908 35 | 68 34 1.619076 1.393093 36 | 70 35 1.612349 2.140490 37 | 72 36 1.669514 1.690111 38 | 74 37 1.684089 1.717531 39 | 76 38 1.728105 1.566389 40 | 78 39 1.721227 1.734667 41 | 80 40 1.752402 1.712041 42 | 82 41 1.792413 1.751300 43 | 84 42 1.805365 2.069800 44 | 86 43 1.832034 2.202732 45 | 88 44 1.849762 1.789907 46 | 90 45 1.840773 2.170467 47 | 92 46 1.873367 2.203971 48 | 94 47 1.954935 1.899615 49 | 96 48 1.911757 2.323550 50 | 98 49 1.924518 2.114701 51 | 100 50 2.046442 1.672974 52 | 102 51 2.033793 1.649106 53 | 104 52 2.017755 2.078827 54 | 106 53 2.044510 2.122777 55 | 108 54 2.087114 1.822135 56 | 110 55 2.061572 2.049700 57 | 112 56 2.064829 2.286370 58 | 114 57 2.124403 2.608272 59 | 116 58 2.156297 2.090831 60 | 118 59 2.188898 1.924997 61 | 120 60 2.132018 1.842915 62 | 122 61 2.182910 2.156344 63 | 124 62 2.174563 2.072547 64 | 126 63 2.202619 2.068290 65 | 128 64 2.157645 3.137856 66 | 130 65 2.264714 2.071294 67 | 132 66 2.303495 1.780891 68 | 134 67 2.241504 2.630869 69 | 136 68 2.278213 2.679318 70 | 138 69 2.264355 2.136575 71 | 140 70 2.290190 2.185572 72 | 142 71 2.275516 2.400735 73 | 144 72 2.316065 2.039199 74 | 146 73 2.275807 1.897216 75 | 148 74 2.248435 2.223572 76 | 150 75 2.239050 2.163999 77 | 152 76 2.233020 2.430378 78 | 154 77 2.246210 2.359198 79 | 156 78 2.272666 2.060722 80 | 158 79 2.215812 2.777095 81 | 160 80 2.252302 2.268121 82 | 162 81 2.279469 2.443304 83 | 164 82 2.226199 2.011663 84 | 166 83 2.284996 2.042674 85 | 168 84 2.313358 2.453234 86 | 170 85 2.280577 2.840463 87 | 172 86 2.228967 2.720196 88 | 174 87 2.278010 2.320841 89 | 176 88 2.283233 2.090246 90 | 178 89 2.243099 2.002581 91 | 180 90 2.243332 2.323935 92 | 182 91 2.291099 2.206615 93 | 184 92 2.246283 2.302744 94 | 186 93 2.283873 2.214185 95 | 188 94 2.297442 2.135794 96 | 190 95 2.273464 2.687888 97 | 192 96 2.330092 2.020195 98 | 194 97 2.269512 3.030402 99 | 196 98 2.287484 2.572323 100 | 198 99 2.308886 2.467212 101 | 200 100 2.286018 2.943572 102 | -------------------------------------------------------------------------------- /results/1/bgi_linear_blk.dat: -------------------------------------------------------------------------------- 1 | bgi(L,BLK) ----------------------------- 2 | capacity load query 3 | 4 2 1.468961 0.080770 4 | 6 3 1.410026 0.066785 5 | 8 4 1.416536 0.059830 6 | 10 5 1.334616 0.061707 7 | 12 6 1.325788 0.059805 8 | 14 7 1.327367 0.062572 9 | 16 8 1.356968 0.060844 10 | 18 9 1.304472 0.063949 11 | 20 10 1.292724 0.065428 12 | 22 11 1.274049 0.065995 13 | 24 12 1.318793 0.066323 14 | 26 13 1.268012 0.068503 15 | 28 14 1.293652 0.071223 16 | 30 15 1.292096 0.070188 17 | 32 16 1.287552 0.067375 18 | 34 17 1.264034 0.069924 19 | 36 18 1.254128 0.071504 20 | 38 19 1.252895 0.071711 21 | 40 20 1.265328 0.070323 22 | 42 21 1.244910 0.075142 23 | 44 22 1.292501 0.071599 24 | 46 23 1.227827 0.074267 25 | 48 24 1.253311 0.075880 26 | 50 25 1.286051 0.076843 27 | 52 26 1.237817 0.070988 28 | 54 27 1.208356 0.070109 29 | 56 28 1.197669 0.071545 30 | 58 29 1.208092 0.070649 31 | 60 30 1.200404 0.073220 32 | 62 31 1.210392 0.074252 33 | 64 32 1.232541 0.074909 34 | 66 33 1.235912 0.077755 35 | 68 34 1.231995 0.076306 36 | 70 35 1.190988 0.079481 37 | 72 36 1.188504 0.079341 38 | 74 37 1.207445 0.081589 39 | 76 38 1.196359 0.081084 40 | 78 39 1.203755 0.088880 41 | 80 40 1.202498 0.086224 42 | 82 41 1.199212 0.087033 43 | 84 42 1.198156 0.087552 44 | 86 43 1.198755 0.088506 45 | 88 44 1.215962 0.088782 46 | 90 45 1.225525 0.093109 47 | 92 46 1.208837 0.090591 48 | 94 47 1.201047 0.093474 49 | 96 48 1.194242 0.090689 50 | 98 49 1.181250 0.092203 51 | 100 50 1.166331 0.094934 52 | 102 51 1.171533 0.097422 53 | 104 52 1.171060 0.099476 54 | 106 53 1.163815 0.098131 55 | 108 54 1.177510 0.108093 56 | 110 55 1.198455 0.106998 57 | 112 56 1.176881 0.106321 58 | 114 57 1.178554 0.109108 59 | 116 58 1.168913 0.104839 60 | 118 59 1.185435 0.104704 61 | 120 60 1.192908 0.119814 62 | 122 61 1.230274 0.103114 63 | 124 62 1.371498 0.093046 64 | 126 63 1.172699 0.090218 65 | 128 64 1.176098 0.095094 66 | 130 65 1.173272 0.094463 67 | 132 66 1.175125 0.096718 68 | 134 67 1.161996 0.097918 69 | 136 68 1.158415 0.099613 70 | 138 69 1.150097 0.102656 71 | 140 70 1.161571 0.102774 72 | 142 71 1.148545 0.105192 73 | 144 72 1.154562 0.104647 74 | 146 73 1.141741 0.107408 75 | 148 74 1.139639 0.108725 76 | 150 75 1.143383 0.109706 77 | 152 76 1.154674 0.121332 78 | 154 77 1.152325 0.123471 79 | 156 78 1.141542 0.112123 80 | 158 79 1.142061 0.118069 81 | 160 80 1.153002 0.126963 82 | 162 81 1.156928 0.129261 83 | 164 82 1.146835 0.129635 84 | 166 83 1.153827 0.130668 85 | 168 84 1.162150 0.129220 86 | 170 85 1.140434 0.135848 87 | 172 86 1.160751 0.132830 88 | 174 87 1.152306 0.132977 89 | 176 88 1.159723 0.133766 90 | 178 89 1.158915 0.136171 91 | 180 90 1.149754 0.124303 92 | 182 91 1.145934 0.125387 93 | 184 92 1.128995 0.122500 94 | 186 93 1.123104 0.129357 95 | 188 94 1.129661 0.126342 96 | 190 95 1.125641 0.128901 97 | 192 96 1.138422 0.127085 98 | 194 97 1.124604 0.131307 99 | 196 98 1.124932 0.129585 100 | 198 99 1.125503 0.131836 101 | 200 100 1.118009 0.129442 102 | -------------------------------------------------------------------------------- /results/1/bgi_quadratic.dat: -------------------------------------------------------------------------------- 1 | bgi(Q,ITR) ----------------------------- 2 | capacity load query 3 | 4 2 1.832217 0.291829 4 | 6 3 1.638019 0.539283 5 | 8 4 1.495396 0.586318 6 | 10 5 1.536665 0.405164 7 | 12 6 1.493773 0.547834 8 | 14 7 1.579430 0.381071 9 | 16 8 1.616968 0.430228 10 | 18 9 1.656568 0.309968 11 | 20 10 1.738347 0.348002 12 | 22 11 1.797978 0.314166 13 | 24 12 1.833440 0.336579 14 | 26 13 1.884282 0.363267 15 | 28 14 1.964477 0.277788 16 | 30 15 2.031398 0.307019 17 | 32 16 2.071711 0.351218 18 | 34 17 2.128181 0.304812 19 | 36 18 2.186665 0.277809 20 | 38 19 2.246391 0.276942 21 | 40 20 2.267578 0.317463 22 | 42 21 2.341638 0.272548 23 | 44 22 2.407218 0.311349 24 | 46 23 2.436335 0.322913 25 | 48 24 2.454916 0.284176 26 | 50 25 2.503729 0.267008 27 | 52 26 2.561884 0.360579 28 | 54 27 2.591391 0.322916 29 | 56 28 2.645666 0.295398 30 | 58 29 2.676774 0.292710 31 | 60 30 2.736452 0.291106 32 | 62 31 2.778189 0.296109 33 | 64 32 2.867854 0.330435 34 | 66 33 2.906556 0.279342 35 | 68 34 2.943640 0.291201 36 | 70 35 2.996267 0.241180 37 | 72 36 3.066936 0.304817 38 | 74 37 3.124147 0.357854 39 | 76 38 3.145413 0.337913 40 | 78 39 3.219833 0.290478 41 | 80 40 3.276807 0.278315 42 | 82 41 3.317041 0.273855 43 | 84 42 3.376240 0.306598 44 | 86 43 3.418896 0.315949 45 | 88 44 3.470350 0.363697 46 | 90 45 3.543025 0.356849 47 | 92 46 3.567994 0.279305 48 | 94 47 3.630702 0.305913 49 | 96 48 3.700599 0.266348 50 | 98 49 3.682100 0.333279 51 | 100 50 3.825210 0.263637 52 | 102 51 3.951188 0.295898 53 | 104 52 3.944611 0.321485 54 | 106 53 4.033361 0.287718 55 | 108 54 4.007792 0.306113 56 | 110 55 4.080562 0.273337 57 | 112 56 4.098810 0.269893 58 | 114 57 4.184407 0.245069 59 | 116 58 4.228533 0.270778 60 | 118 59 4.272271 0.218240 61 | 120 60 4.315306 0.246536 62 | 122 61 4.388891 0.254562 63 | 124 62 4.456624 0.240234 64 | 126 63 4.510523 0.254826 65 | 128 64 4.541862 0.270625 66 | 130 65 4.547213 0.272322 67 | 132 66 4.602304 0.286893 68 | 134 67 4.607624 0.270055 69 | 136 68 4.618093 0.262243 70 | 138 69 4.667698 0.313662 71 | 140 70 4.727277 0.262313 72 | 142 71 4.692670 0.297564 73 | 144 72 4.675828 0.345802 74 | 146 73 4.687525 0.332508 75 | 148 74 4.727417 0.346475 76 | 150 75 4.714131 0.329887 77 | 152 76 4.783999 0.308728 78 | 154 77 4.801448 0.324475 79 | 156 78 4.796568 0.308545 80 | 158 79 4.884750 0.315982 81 | 160 80 4.938462 0.310173 82 | 162 81 4.979535 0.384103 83 | 164 82 4.982822 0.320089 84 | 166 83 5.028336 0.359065 85 | 168 84 5.112522 0.362557 86 | 170 85 5.100938 0.335277 87 | 172 86 5.081241 0.343299 88 | 174 87 5.100958 0.318506 89 | 176 88 5.163308 0.359908 90 | 178 89 5.219003 0.371291 91 | 180 90 5.382962 0.346506 92 | 182 91 5.365950 0.344327 93 | 184 92 5.409769 0.312715 94 | 186 93 5.435962 0.310991 95 | 188 94 5.506002 0.303338 96 | 190 95 5.541301 0.280217 97 | 192 96 5.545936 0.305648 98 | 194 97 5.562491 0.295192 99 | 196 98 5.631360 0.295689 100 | 198 99 5.697633 0.322621 101 | 200 100 5.683871 0.299108 102 | -------------------------------------------------------------------------------- /results/1/bgi_quadratic_blk.dat: -------------------------------------------------------------------------------- 1 | bgi(Q,BLK) ----------------------------- 2 | capacity load query 3 | 4 2 1.456003 0.066405 4 | 6 3 1.382453 0.056052 5 | 8 4 1.380562 0.052350 6 | 10 5 1.308677 0.052012 7 | 12 6 1.302737 0.052766 8 | 14 7 1.299792 0.055578 9 | 16 8 1.335791 0.053193 10 | 18 9 1.278232 0.054941 11 | 20 10 1.283764 0.057445 12 | 22 11 1.253643 0.057949 13 | 24 12 1.294815 0.059557 14 | 26 13 1.252726 0.060496 15 | 28 14 1.265505 0.063137 16 | 30 15 1.256627 0.062266 17 | 32 16 1.274281 0.059874 18 | 34 17 1.243352 0.062360 19 | 36 18 1.229755 0.063428 20 | 38 19 1.232009 0.063833 21 | 40 20 1.254104 0.063295 22 | 42 21 1.218652 0.064067 23 | 44 22 1.216606 0.066682 24 | 46 23 1.209970 0.066667 25 | 48 24 1.225383 0.068024 26 | 50 25 1.222593 0.069519 27 | 52 26 1.245233 0.070680 28 | 54 27 1.206165 0.072057 29 | 56 28 1.207502 0.072536 30 | 58 29 1.222233 0.073778 31 | 60 30 1.203365 0.073852 32 | 62 31 1.211828 0.075135 33 | 64 32 1.233505 0.080786 34 | 66 33 1.264642 0.076449 35 | 68 34 1.240471 0.076767 36 | 70 35 1.193888 0.081588 37 | 72 36 1.211492 0.090630 38 | 74 37 1.223995 0.085956 39 | 76 38 1.218680 0.081468 40 | 78 39 1.197526 0.083352 41 | 80 40 1.195625 0.087217 42 | 82 41 1.198200 0.088447 43 | 84 42 1.198969 0.092741 44 | 86 43 1.206277 0.089957 45 | 88 44 1.212482 0.090826 46 | 90 45 1.210123 0.093727 47 | 92 46 1.191302 0.092733 48 | 94 47 1.196087 0.092113 49 | 96 48 1.187842 0.093340 50 | 98 49 1.187907 0.094221 51 | 100 50 1.169431 0.097133 52 | 102 51 1.172130 0.099775 53 | 104 52 1.163718 0.098304 54 | 106 53 1.163224 0.100349 55 | 108 54 1.157617 0.097919 56 | 110 55 1.160595 0.098425 57 | 112 56 1.167358 0.100367 58 | 114 57 1.157099 0.098121 59 | 116 58 1.162130 0.097051 60 | 118 59 1.164172 0.094968 61 | 120 60 1.161389 0.097190 62 | 122 61 1.173094 0.093538 63 | 124 62 1.171878 0.091271 64 | 126 63 1.173852 0.091229 65 | 128 64 1.178150 0.093205 66 | 130 65 1.162705 0.095112 67 | 132 66 1.159981 0.097083 68 | 134 67 1.159131 0.098310 69 | 136 68 1.160750 0.102007 70 | 138 69 1.148461 0.102651 71 | 140 70 1.150509 0.103896 72 | 142 71 1.145987 0.107265 73 | 144 72 1.150881 0.108608 74 | 146 73 1.144695 0.108322 75 | 148 74 1.138480 0.108688 76 | 150 75 1.132024 0.113176 77 | 152 76 1.137068 0.112462 78 | 154 77 1.134645 0.113401 79 | 156 78 1.136021 0.113769 80 | 158 79 1.141845 0.117272 81 | 160 80 1.140319 0.116183 82 | 162 81 1.137040 0.115114 83 | 164 82 1.136785 0.117123 84 | 166 83 1.141820 0.121715 85 | 168 84 1.143936 0.119247 86 | 170 85 1.136692 0.120606 87 | 172 86 1.138193 0.122134 88 | 174 87 1.147066 0.122412 89 | 176 88 1.142980 0.121216 90 | 178 89 1.145517 0.124305 91 | 180 90 1.136790 0.140815 92 | 182 91 1.156171 0.142502 93 | 184 92 1.142635 0.139961 94 | 186 93 1.137308 0.143318 95 | 188 94 1.139102 0.140510 96 | 190 95 1.138006 0.144646 97 | 192 96 1.132146 0.143890 98 | 194 97 1.139116 0.147509 99 | 196 98 1.146759 0.146866 100 | 198 99 1.135897 0.148440 101 | 200 100 1.135911 0.148106 102 | -------------------------------------------------------------------------------- /results/1/bgi_rstar.dat: -------------------------------------------------------------------------------- 1 | bgi(R,ITR) ----------------------------- 2 | capacity load query 3 | 4 2 3.587833 0.228547 4 | 6 3 2.972042 0.137287 5 | 8 4 3.382335 0.139458 6 | 10 5 4.014576 0.195935 7 | 12 6 4.348847 0.184347 8 | 14 7 5.071633 0.102921 9 | 16 8 5.623204 0.095786 10 | 18 9 6.758845 0.126205 11 | 20 10 8.037869 0.151776 12 | 22 11 8.920998 0.167756 13 | 24 12 10.279086 0.152256 14 | 26 13 11.163829 0.142093 15 | 28 14 12.701635 0.131065 16 | 30 15 14.261168 0.129469 17 | 32 16 15.059403 0.113546 18 | 34 17 18.258060 0.132645 19 | 36 18 20.224718 0.138673 20 | 38 19 22.148699 0.123822 21 | 40 20 25.201305 0.163857 22 | 42 21 25.777679 0.123205 23 | 44 22 28.179966 0.137113 24 | 46 23 29.373465 0.146194 25 | 48 24 30.701652 0.146205 26 | 50 25 32.038461 0.136437 27 | 52 26 32.725170 0.137793 28 | 54 27 34.249338 0.145007 29 | 56 28 34.957995 0.132759 30 | 58 29 36.133333 0.133071 31 | 60 30 37.446996 0.129852 32 | 62 31 38.026014 0.128394 33 | 64 32 38.747504 0.125232 34 | 66 33 39.591712 0.144880 35 | 68 34 40.917997 0.140098 36 | 70 35 41.977774 0.151300 37 | 72 36 42.245280 0.137693 38 | 74 37 43.441812 0.138089 39 | 76 38 43.526301 0.144087 40 | 78 39 43.474470 0.128037 41 | 80 40 44.481405 0.139326 42 | 82 41 45.721345 0.139838 43 | 84 42 46.121020 0.144328 44 | 86 43 46.792856 0.143825 45 | 88 44 47.301963 0.140178 46 | 90 45 49.093974 0.143873 47 | 92 46 48.481348 0.142561 48 | 94 47 50.359052 0.146746 49 | 96 48 50.368991 0.148148 50 | 98 49 50.602154 0.146169 51 | 100 50 53.031076 0.158253 52 | 102 51 52.836091 0.154699 53 | 104 52 53.803399 0.154984 54 | 106 53 53.141854 0.131934 55 | 108 54 54.303397 0.150499 56 | 110 55 55.820132 0.147296 57 | 112 56 54.837688 0.143002 58 | 114 57 56.876283 0.152091 59 | 116 58 57.035013 0.150001 60 | 118 59 57.921840 0.132926 61 | 120 60 58.050423 0.158590 62 | 122 61 58.686761 0.176816 63 | 124 62 60.071808 0.164708 64 | 126 63 60.268547 0.152144 65 | 128 64 60.030746 0.169219 66 | 130 65 60.226548 0.168585 67 | 132 66 61.957835 0.163422 68 | 134 67 61.558842 0.145994 69 | 136 68 63.084055 0.163946 70 | 138 69 62.883414 0.167083 71 | 140 70 65.411809 0.149703 72 | 142 71 65.177271 0.169680 73 | 144 72 66.730840 0.154577 74 | 146 73 65.988077 0.147430 75 | 148 74 64.464742 0.151052 76 | 150 75 65.701375 0.156876 77 | 152 76 66.536194 0.153104 78 | 154 77 67.387119 0.171253 79 | 156 78 67.489206 0.153085 80 | 158 79 69.514155 0.173202 81 | 160 80 70.055431 0.180156 82 | 162 81 71.725375 0.158655 83 | 164 82 69.169435 0.156066 84 | 166 83 68.801693 0.172297 85 | 168 84 71.847795 0.174899 86 | 170 85 73.578630 0.183949 87 | 172 86 72.380734 0.157652 88 | 174 87 75.393773 0.163125 89 | 176 88 76.028127 0.154322 90 | 178 89 80.731147 0.165447 91 | 180 90 80.688467 0.233244 92 | 182 91 80.882703 0.178960 93 | 184 92 75.850358 0.158121 94 | 186 93 77.417819 0.184892 95 | 188 94 77.462205 0.163083 96 | 190 95 76.456115 0.175197 97 | 192 96 79.878399 0.178129 98 | 194 97 78.635968 0.179389 99 | 196 98 79.984378 0.187309 100 | 198 99 79.659825 0.188401 101 | 200 100 80.294809 0.173472 102 | -------------------------------------------------------------------------------- /results/1/bgi_rstar_blk.dat: -------------------------------------------------------------------------------- 1 | bgi(R,BLK) ----------------------------- 2 | capacity load query 3 | 4 2 1.465688 0.066457 4 | 6 3 1.400643 0.057554 5 | 8 4 1.389825 0.053743 6 | 10 5 1.313854 0.052581 7 | 12 6 1.307441 0.055751 8 | 14 7 1.304851 0.056561 9 | 16 8 1.331797 0.052827 10 | 18 9 1.275027 0.057698 11 | 20 10 1.275429 0.056882 12 | 22 11 1.256350 0.057931 13 | 24 12 1.298269 0.059501 14 | 26 13 1.254937 0.060722 15 | 28 14 1.270594 0.062027 16 | 30 15 1.260594 0.064495 17 | 32 16 1.269981 0.059627 18 | 34 17 1.241371 0.061701 19 | 36 18 1.230061 0.062016 20 | 38 19 1.234782 0.062535 21 | 40 20 1.250023 0.061292 22 | 42 21 1.221327 0.062366 23 | 44 22 1.209865 0.064956 24 | 46 23 1.211642 0.065224 25 | 48 24 1.224938 0.066069 26 | 50 25 1.216253 0.070184 27 | 52 26 1.240648 0.069070 28 | 54 27 1.198065 0.070419 29 | 56 28 1.190321 0.069427 30 | 58 29 1.207948 0.072099 31 | 60 30 1.199393 0.072650 32 | 62 31 1.211071 0.073124 33 | 64 32 1.223246 0.075862 34 | 66 33 1.239369 0.074890 35 | 68 34 1.231773 0.075635 36 | 70 35 1.193246 0.078712 37 | 72 36 1.199327 0.080151 38 | 74 37 1.203481 0.079442 39 | 76 38 1.196799 0.079559 40 | 78 39 1.189486 0.082083 41 | 80 40 1.192106 0.085667 42 | 82 41 1.200430 0.087073 43 | 84 42 1.193452 0.086385 44 | 86 43 1.210621 0.089708 45 | 88 44 1.215892 0.087708 46 | 90 45 1.196620 0.089426 47 | 92 46 1.192760 0.090468 48 | 94 47 1.190236 0.090416 49 | 96 48 1.183415 0.090081 50 | 98 49 1.180073 0.091020 51 | 100 50 1.170748 0.095699 52 | 102 51 1.170384 0.095116 53 | 104 52 1.165362 0.095712 54 | 106 53 1.157845 0.098682 55 | 108 54 1.173633 0.105382 56 | 110 55 1.159935 0.094786 57 | 112 56 1.159633 0.094856 58 | 114 57 1.158847 0.096547 59 | 116 58 1.156819 0.094445 60 | 118 59 1.161043 0.094440 61 | 120 60 1.164373 0.092925 62 | 122 61 1.172884 0.093396 63 | 124 62 1.172399 0.090945 64 | 126 63 1.171651 0.090299 65 | 128 64 1.168008 0.089843 66 | 130 65 1.170701 0.095011 67 | 132 66 1.156521 0.095044 68 | 134 67 1.157420 0.096675 69 | 136 68 1.152004 0.100494 70 | 138 69 1.152596 0.102150 71 | 140 70 1.183999 0.122939 72 | 142 71 1.174396 0.121741 73 | 144 72 1.194781 0.120794 74 | 146 73 1.183771 0.121620 75 | 148 74 1.179753 0.120574 76 | 150 75 1.183598 0.125303 77 | 152 76 1.178754 0.127127 78 | 154 77 1.208946 0.126971 79 | 156 78 1.193820 0.128849 80 | 158 79 1.187521 0.128472 81 | 160 80 1.171011 0.129615 82 | 162 81 1.174218 0.131168 83 | 164 82 1.162953 0.129198 84 | 166 83 1.163462 0.134019 85 | 168 84 1.167394 0.132258 86 | 170 85 1.158643 0.130689 87 | 172 86 1.154937 0.138476 88 | 174 87 1.180375 0.136236 89 | 176 88 1.148937 0.120083 90 | 178 89 1.154348 0.120753 91 | 180 90 1.139827 0.122662 92 | 182 91 1.147337 0.120059 93 | 184 92 1.140138 0.124594 94 | 186 93 1.130902 0.122664 95 | 188 94 1.133674 0.125467 96 | 190 95 1.127806 0.125043 97 | 192 96 1.134457 0.125472 98 | 194 97 1.144533 0.146623 99 | 196 98 1.155504 0.147590 100 | 198 99 1.158981 0.142853 101 | 200 100 1.158351 0.148204 102 | -------------------------------------------------------------------------------- /results/1/lsi_linear.dat: -------------------------------------------------------------------------------- 1 | lsi(L,ITR) ----------------------------- 2 | capacity load query 3 | 4 2 14.500422 16.995602 4 | 6 3 13.330117 27.499602 5 | 8 4 13.638728 19.681967 6 | 10 5 13.638323 22.258306 7 | 12 6 14.128633 27.484733 8 | 14 7 14.516855 23.663796 9 | 16 8 14.571155 30.285795 10 | 18 9 14.965637 22.693425 11 | 20 10 15.671487 36.553080 12 | 22 11 15.763645 39.102006 13 | 24 12 16.266946 29.448768 14 | 26 13 17.404635 29.525380 15 | 28 14 17.403720 25.284653 16 | 30 15 17.899968 44.527702 17 | 32 16 18.462594 37.259588 18 | 34 17 18.831235 35.499855 19 | 36 18 19.327759 41.761796 20 | 38 19 20.402133 34.769559 21 | 40 20 20.505166 39.200033 22 | 42 21 20.395994 33.861951 23 | 44 22 21.402584 40.708551 24 | 46 23 21.451369 40.740255 25 | 48 24 21.907922 46.430633 26 | 50 25 21.076163 55.597300 27 | 52 26 21.337861 44.802060 28 | 54 27 21.786065 50.150947 29 | 56 28 23.458807 46.653559 30 | 58 29 22.849513 42.150267 31 | 60 30 23.292896 47.677510 32 | 62 31 24.239850 47.425679 33 | 64 32 24.229402 52.917034 34 | 66 33 25.589727 48.619005 35 | 68 34 25.130001 51.338620 36 | 70 35 25.874421 54.337050 37 | 72 36 26.477299 56.618782 38 | 74 37 26.631485 46.774450 39 | 76 38 26.876136 45.721415 40 | 78 39 28.539270 55.580113 41 | 80 40 28.342030 64.399725 42 | 82 41 28.766519 55.267838 43 | 84 42 29.325351 75.492373 44 | 86 43 29.460014 72.392017 45 | 88 44 30.599082 65.986178 46 | 90 45 30.718877 64.129433 47 | 92 46 31.027842 61.469918 48 | 94 47 31.105808 63.728696 49 | 96 48 32.471202 66.666097 50 | 98 49 31.649776 65.348505 51 | 100 50 33.157115 66.872910 52 | 102 51 32.858069 70.755463 53 | 104 52 32.736027 75.520111 54 | 106 53 33.442997 73.413262 55 | 108 54 34.432176 58.344845 56 | 110 55 34.826398 71.719026 57 | 112 56 34.526975 79.762231 58 | 114 57 34.622453 83.376968 59 | 116 58 35.262070 64.522692 60 | 118 59 36.978592 79.833964 61 | 120 60 36.008531 91.666503 62 | 122 61 36.218190 78.726145 63 | 124 62 36.985787 75.614018 64 | 126 63 36.283023 61.104325 65 | 128 64 36.904490 80.072209 66 | 130 65 37.798499 69.687548 67 | 132 66 37.977362 80.930699 68 | 134 67 39.893992 93.220776 69 | 136 68 38.715554 96.802004 70 | 138 69 39.524673 88.555699 71 | 140 70 40.065888 77.858113 72 | 142 71 38.709986 79.245066 73 | 144 72 38.799092 90.491616 74 | 146 73 38.514572 74.623422 75 | 148 74 38.580295 89.865878 76 | 150 75 38.393681 96.823150 77 | 152 76 39.424286 101.099371 78 | 154 77 40.880960 100.322742 79 | 156 78 39.803477 72.514954 80 | 158 79 40.248430 126.220495 81 | 160 80 40.964883 92.443301 82 | 162 81 41.416353 99.208439 83 | 164 82 40.481610 114.543552 84 | 166 83 39.994302 97.054564 85 | 168 84 42.762250 83.601308 86 | 170 85 41.299486 100.104937 87 | 172 86 40.702148 107.400145 88 | 174 87 40.779354 133.780922 89 | 176 88 42.018733 89.905619 90 | 178 89 42.909571 92.504670 91 | 180 90 41.406129 102.418573 92 | 182 91 44.636732 119.981988 93 | 184 92 44.299450 94.116345 94 | 186 93 43.656589 96.056887 95 | 188 94 44.312260 88.552299 96 | 190 95 43.484574 115.048293 97 | 192 96 44.724548 89.084110 98 | 194 97 44.056528 117.888545 99 | 196 98 44.577705 113.841695 100 | 198 99 45.535039 133.197519 101 | 200 100 45.745926 107.152367 102 | -------------------------------------------------------------------------------- /results/1/lsi_linear_blk.dat: -------------------------------------------------------------------------------- 1 | lsi(L,BLK) ----------------------------- 2 | capacity load query 3 | 4 2 6.848435 2.247040 4 | 6 3 5.899712 1.750552 5 | 8 4 5.588487 1.415897 6 | 10 5 5.516026 1.576635 7 | 12 6 5.353983 1.531315 8 | 14 7 5.357520 1.626940 9 | 16 8 5.372391 1.586821 10 | 18 9 5.319752 1.637184 11 | 20 10 5.202889 1.636926 12 | 22 11 5.272227 1.718814 13 | 24 12 5.418732 1.744634 14 | 26 13 5.184348 1.804413 15 | 28 14 5.727421 1.867555 16 | 30 15 5.145668 1.924479 17 | 32 16 5.777876 1.926986 18 | 34 17 5.136164 1.949210 19 | 36 18 5.395094 2.038125 20 | 38 19 5.343896 2.068777 21 | 40 20 5.822992 2.007661 22 | 42 21 5.221792 2.163976 23 | 44 22 5.127194 2.211196 24 | 46 23 5.498906 2.259904 25 | 48 24 5.088524 2.329412 26 | 50 25 5.368837 2.138501 27 | 52 26 5.122501 2.432560 28 | 54 27 5.111010 2.593414 29 | 56 28 5.630308 2.504647 30 | 58 29 5.667810 2.497358 31 | 60 30 5.102223 2.716912 32 | 62 31 5.077434 2.684077 33 | 64 32 5.380802 2.668315 34 | 66 33 5.085460 2.801572 35 | 68 34 5.158899 2.801662 36 | 70 35 5.077822 2.741153 37 | 72 36 5.162676 2.891848 38 | 74 37 5.170449 2.924176 39 | 76 38 5.101896 2.911784 40 | 78 39 5.095539 2.888365 41 | 80 40 5.073257 2.992900 42 | 82 41 5.667376 2.954167 43 | 84 42 5.075781 2.887605 44 | 86 43 5.605842 3.094091 45 | 88 44 5.332822 3.137073 46 | 90 45 5.102405 3.110474 47 | 92 46 5.080403 3.262992 48 | 94 47 5.070283 3.211417 49 | 96 48 5.061199 3.343833 50 | 98 49 5.077709 3.236265 51 | 100 50 5.529440 3.353039 52 | 102 51 5.058209 3.416513 53 | 104 52 5.645824 3.503499 54 | 106 53 5.369770 3.556756 55 | 108 54 5.096835 3.682925 56 | 110 55 5.081192 3.662315 57 | 112 56 5.614272 3.715456 58 | 114 57 5.801445 3.768697 59 | 116 58 5.094170 3.773757 60 | 118 59 5.091353 3.834865 61 | 120 60 5.094945 3.934828 62 | 122 61 5.087747 3.968257 63 | 124 62 5.091191 4.086214 64 | 126 63 5.543659 3.866577 65 | 128 64 5.074555 3.963956 66 | 130 65 5.092293 4.091173 67 | 132 66 5.076733 4.147803 68 | 134 67 5.127629 4.268719 69 | 136 68 5.135263 4.262787 70 | 138 69 5.480527 4.390197 71 | 140 70 5.127226 4.439838 72 | 142 71 5.315945 4.601522 73 | 144 72 5.135285 4.411087 74 | 146 73 5.125800 4.469263 75 | 148 74 5.117568 4.646306 76 | 150 75 5.129963 4.670288 77 | 152 76 5.138387 4.757861 78 | 154 77 5.126352 4.700991 79 | 156 78 5.226900 4.841025 80 | 158 79 5.129848 4.938305 81 | 160 80 5.124945 5.509930 82 | 162 81 5.116715 4.988753 83 | 164 82 5.104551 4.935023 84 | 166 83 5.124454 5.063805 85 | 168 84 5.107696 5.060620 86 | 170 85 5.122195 5.180088 87 | 172 86 5.150161 5.139795 88 | 174 87 5.118288 5.490006 89 | 176 88 5.111976 5.190593 90 | 178 89 5.143266 5.260763 91 | 180 90 5.687313 5.258568 92 | 182 91 5.129259 5.365662 93 | 184 92 5.123683 5.441824 94 | 186 93 5.384626 5.478543 95 | 188 94 5.128338 5.623024 96 | 190 95 5.129581 5.850321 97 | 192 96 5.141973 5.729583 98 | 194 97 5.670456 5.901040 99 | 196 98 5.139871 5.887517 100 | 198 99 5.116863 6.041419 101 | 200 100 5.092826 5.684851 102 | -------------------------------------------------------------------------------- /results/1/lsi_quadratic.dat: -------------------------------------------------------------------------------- 1 | lsi(Q,ITR) ----------------------------- 2 | capacity load query 3 | 4 2 16.040384 3.210268 4 | 6 3 16.174582 6.580223 5 | 8 4 15.819658 7.434966 6 | 10 5 16.613742 5.934263 7 | 12 6 17.674909 8.454182 8 | 14 7 18.951240 6.393995 9 | 16 8 18.951391 6.665488 10 | 18 9 20.255136 5.536110 11 | 20 10 21.167984 6.543957 12 | 22 11 22.384923 6.267993 13 | 24 12 23.443534 6.901462 14 | 26 13 23.375649 7.580034 15 | 28 14 24.516138 5.573141 16 | 30 15 25.741448 6.418726 17 | 32 16 26.994965 8.024472 18 | 34 17 27.487631 6.802761 19 | 36 18 28.347365 6.240944 20 | 38 19 29.509947 6.593070 21 | 40 20 30.639177 7.918193 22 | 42 21 30.361001 6.643724 23 | 44 22 31.151429 7.402924 24 | 46 23 33.790150 7.866685 25 | 48 24 32.597823 7.254878 26 | 50 25 33.292293 6.727749 27 | 52 26 36.868133 9.439784 28 | 54 27 35.284148 8.515136 29 | 56 28 35.131080 8.137387 30 | 58 29 37.413645 7.386012 31 | 60 30 36.261443 7.896325 32 | 62 31 38.176418 8.365910 33 | 64 32 41.135014 9.197859 34 | 66 33 40.276695 7.814908 35 | 68 34 40.717347 8.238413 36 | 70 35 42.033146 6.809075 37 | 72 36 42.579205 8.919300 38 | 74 37 43.297748 10.016377 39 | 76 38 43.466470 10.749744 40 | 78 39 46.072142 8.801181 41 | 80 40 46.695211 8.413802 42 | 82 41 48.527061 8.409478 43 | 84 42 47.969135 9.755071 44 | 86 43 49.807864 10.118189 45 | 88 44 48.978872 12.055496 46 | 90 45 50.224006 11.936305 47 | 92 46 52.798708 9.460666 48 | 94 47 54.287288 10.296571 49 | 96 48 54.239654 8.890582 50 | 98 49 55.589117 10.314024 51 | 100 50 55.015222 8.833769 52 | 102 51 56.088265 11.355171 53 | 104 52 57.520709 12.623280 54 | 106 53 57.994744 10.770926 55 | 108 54 58.160310 11.635163 56 | 110 55 59.382371 9.960751 57 | 112 56 59.301273 9.719768 58 | 114 57 59.224848 8.995973 59 | 116 58 61.067073 10.519253 60 | 118 59 62.682832 7.999868 61 | 120 60 62.374303 9.652007 62 | 122 61 65.637080 9.747794 63 | 124 62 66.013520 9.150475 64 | 126 63 66.116070 9.770988 65 | 128 64 64.795783 10.200935 66 | 130 65 67.728996 10.191551 67 | 132 66 67.543951 11.281011 68 | 134 67 69.025074 10.460935 69 | 136 68 68.032438 9.853142 70 | 138 69 69.403672 11.659636 71 | 140 70 69.599810 10.114941 72 | 142 71 71.427055 10.412250 73 | 144 72 77.025526 12.134186 74 | 146 73 70.288471 11.229331 75 | 148 74 72.162131 11.572862 76 | 150 75 72.024778 11.741473 77 | 152 76 72.941958 10.878158 78 | 154 77 73.672747 11.563917 79 | 156 78 75.831952 10.822037 80 | 158 79 74.546411 11.814214 81 | 160 80 77.451844 10.878539 82 | 162 81 78.139990 13.744969 83 | 164 82 77.705467 11.590812 84 | 166 83 77.584399 11.948633 85 | 168 84 77.936156 13.966120 86 | 170 85 79.653216 12.372269 87 | 172 86 84.459081 12.702969 88 | 174 87 82.539406 11.928063 89 | 176 88 80.418948 13.641362 90 | 178 89 83.298095 13.948907 91 | 180 90 86.066384 12.438352 92 | 182 91 81.944714 12.284965 93 | 184 92 82.996207 12.376615 94 | 186 93 83.539079 12.978176 95 | 188 94 84.589560 12.175698 96 | 190 95 85.994291 11.700562 97 | 192 96 86.305784 12.322692 98 | 194 97 85.750541 11.685063 99 | 196 98 88.404909 11.813598 100 | 198 99 90.066446 13.940210 101 | 200 100 90.148127 12.630011 102 | -------------------------------------------------------------------------------- /results/1/lsi_quadratic_blk.dat: -------------------------------------------------------------------------------- 1 | lsi(Q,BLK) ----------------------------- 2 | capacity load query 3 | 4 2 6.855231 2.344789 4 | 6 3 6.165892 1.748922 5 | 8 4 5.536340 1.518099 6 | 10 5 5.939593 1.550845 7 | 12 6 5.262618 1.540463 8 | 14 7 5.601220 1.620061 9 | 16 8 5.165931 1.677412 10 | 18 9 5.500543 1.613269 11 | 20 10 5.089140 1.601645 12 | 22 11 5.158933 1.772968 13 | 24 12 5.111315 1.732019 14 | 26 13 5.042876 1.736165 15 | 28 14 5.619697 1.856724 16 | 30 15 5.127859 1.927957 17 | 32 16 5.602337 1.954479 18 | 34 17 5.072766 1.912844 19 | 36 18 5.039212 1.979997 20 | 38 19 5.107924 2.055617 21 | 40 20 5.289186 2.007392 22 | 42 21 5.324972 2.164843 23 | 44 22 5.095519 2.229808 24 | 46 23 5.409497 2.272068 25 | 48 24 5.093473 2.350033 26 | 50 25 5.072382 2.157151 27 | 52 26 5.096525 2.473594 28 | 54 27 5.077503 2.578483 29 | 56 28 5.543821 2.483116 30 | 58 29 5.070209 2.487175 31 | 60 30 4.979823 2.672530 32 | 62 31 5.336962 2.736664 33 | 64 32 5.103959 2.681495 34 | 66 33 5.096650 2.811786 35 | 68 34 5.074413 2.777791 36 | 70 35 5.182242 2.818532 37 | 72 36 5.222641 2.860590 38 | 74 37 5.086422 2.877555 39 | 76 38 5.093278 2.845263 40 | 78 39 5.073390 2.972620 41 | 80 40 5.091667 3.003288 42 | 82 41 5.872859 3.050467 43 | 84 42 5.733206 2.864424 44 | 86 43 4.986527 3.023084 45 | 88 44 5.646366 3.085763 46 | 90 45 4.994471 3.183369 47 | 92 46 5.739227 3.240841 48 | 94 47 5.001810 3.190300 49 | 96 48 4.989852 3.306091 50 | 98 49 5.021868 3.172270 51 | 100 50 5.564635 3.370518 52 | 102 51 5.481605 3.375876 53 | 104 52 4.972185 3.431971 54 | 106 53 4.979915 3.489336 55 | 108 54 5.148618 3.683312 56 | 110 55 5.223043 3.658838 57 | 112 56 5.462901 3.610661 58 | 114 57 5.377128 3.789266 59 | 116 58 5.814753 3.840102 60 | 118 59 5.718355 3.900738 61 | 120 60 5.634782 3.881326 62 | 122 61 5.032304 3.983862 63 | 124 62 5.154771 4.042321 64 | 126 63 4.969706 3.807817 65 | 128 64 5.034306 3.977516 66 | 130 65 5.674915 4.038379 67 | 132 66 5.242274 4.056569 68 | 134 67 5.218190 4.163891 69 | 136 68 5.613657 4.128004 70 | 138 69 4.979930 4.328085 71 | 140 70 5.052835 4.347394 72 | 142 71 4.987928 4.510868 73 | 144 72 5.717205 4.345377 74 | 146 73 4.978965 4.431659 75 | 148 74 5.076621 4.529744 76 | 150 75 5.069644 4.448083 77 | 152 76 4.986312 4.596378 78 | 154 77 4.995547 4.753210 79 | 156 78 5.569125 4.880041 80 | 158 79 5.184656 4.962181 81 | 160 80 5.793511 5.622661 82 | 162 81 5.626823 4.879585 83 | 164 82 5.008386 4.957979 84 | 166 83 5.733340 5.097538 85 | 168 84 5.092441 5.009462 86 | 170 85 4.999157 4.976394 87 | 172 86 5.351425 5.050933 88 | 174 87 5.034808 5.486313 89 | 176 88 5.002700 5.051288 90 | 178 89 5.000121 5.156595 91 | 180 90 5.035918 5.279704 92 | 182 91 5.118010 5.374662 93 | 184 92 5.083242 5.318773 94 | 186 93 5.008884 5.318103 95 | 188 94 5.011159 5.528719 96 | 190 95 4.999220 5.696172 97 | 192 96 5.265898 5.650951 98 | 194 97 5.028070 5.699764 99 | 196 98 5.005098 5.692949 100 | 198 99 4.994185 5.875759 101 | 200 100 4.997559 5.590636 102 | -------------------------------------------------------------------------------- /results/1/lsi_rstar.dat: -------------------------------------------------------------------------------- 1 | lsi(R,ITR) ----------------------------- 2 | capacity load query 3 | 4 2 79.598077 7.954981 4 | 6 3 59.538167 6.322990 5 | 8 4 24.854758 1.826932 6 | 10 5 25.734341 1.527043 7 | 12 6 25.167276 1.889076 8 | 14 7 26.952692 1.807687 9 | 16 8 28.896286 1.738528 10 | 18 9 29.883482 1.792454 11 | 20 10 30.783111 1.748502 12 | 22 11 31.017577 1.918211 13 | 24 12 31.491810 1.994493 14 | 26 13 34.349368 1.857396 15 | 28 14 34.393851 2.019072 16 | 30 15 36.150443 2.122994 17 | 32 16 35.654361 2.041643 18 | 34 17 37.633928 2.169062 19 | 36 18 38.785230 2.451812 20 | 38 19 38.281862 2.233051 21 | 40 20 40.649910 2.389729 22 | 42 21 41.847855 2.556124 23 | 44 22 42.084956 2.731931 24 | 46 23 43.674042 2.686229 25 | 48 24 44.655050 2.824840 26 | 50 25 45.687132 2.855534 27 | 52 26 45.522074 2.821320 28 | 54 27 46.043577 2.487723 29 | 56 28 48.208666 2.756070 30 | 58 29 48.452350 2.799916 31 | 60 30 50.866950 2.823916 32 | 62 31 51.522838 2.914634 33 | 64 32 52.414771 3.040236 34 | 66 33 54.017229 2.945651 35 | 68 34 53.092719 3.055875 36 | 70 35 56.027099 3.130821 37 | 72 36 55.586151 3.152279 38 | 74 37 57.190221 3.324731 39 | 76 38 58.726059 3.285184 40 | 78 39 59.860974 3.208477 41 | 80 40 62.095526 3.517759 42 | 82 41 61.583023 3.367575 43 | 84 42 61.764221 3.672186 44 | 86 43 65.185477 3.570308 45 | 88 44 64.407839 3.601176 46 | 90 45 65.724342 3.660505 47 | 92 46 66.218590 3.628492 48 | 94 47 65.338248 3.601814 49 | 96 48 68.249573 3.669889 50 | 98 49 68.275836 3.549863 51 | 100 50 69.532105 3.975666 52 | 102 51 70.687382 4.003550 53 | 104 52 70.864664 3.942115 54 | 106 53 72.842872 4.398358 55 | 108 54 73.301912 4.206129 56 | 110 55 73.711097 4.344121 57 | 112 56 73.060410 4.230592 58 | 114 57 74.847339 4.284965 59 | 116 58 77.649691 4.194680 60 | 118 59 78.796350 4.437035 61 | 120 60 77.847338 4.193755 62 | 122 61 79.011929 4.244960 63 | 124 62 80.613588 4.323986 64 | 126 63 81.968209 5.299320 65 | 128 64 81.934152 5.313831 66 | 130 65 82.499391 5.164290 67 | 132 66 83.543402 5.401168 68 | 134 67 84.381706 5.401554 69 | 136 68 85.364340 5.328141 70 | 138 69 84.744263 5.299678 71 | 140 70 85.589345 5.287401 72 | 142 71 85.974236 5.204696 73 | 144 72 86.547241 5.231526 74 | 146 73 88.222952 5.400136 75 | 148 74 89.255533 5.353451 76 | 150 75 87.616711 5.134309 77 | 152 76 87.131831 5.262522 78 | 154 77 90.689164 5.365727 79 | 156 78 91.523242 5.494771 80 | 158 79 91.190279 5.555939 81 | 160 80 92.771061 5.572486 82 | 162 81 93.136729 5.352187 83 | 164 82 93.002917 5.246555 84 | 166 83 94.583892 5.475560 85 | 168 84 94.993383 5.467706 86 | 170 85 96.364409 5.603464 87 | 172 86 97.116261 5.393433 88 | 174 87 97.464097 5.560457 89 | 176 88 99.077375 5.430457 90 | 178 89 99.317297 5.581091 91 | 180 90 98.378381 5.410673 92 | 182 91 99.471080 5.562050 93 | 184 92 100.1074675.634736 94 | 186 93 102.4767785.725679 95 | 188 94 103.0876175.697840 96 | 190 95 104.1316585.883141 97 | 192 96 104.5277165.903230 98 | 194 97 103.6064005.684716 99 | 196 98 106.1853726.004029 100 | 198 99 105.8919025.659413 101 | 200 100 107.2960375.647985 102 | -------------------------------------------------------------------------------- /results/1/lsi_rstar_blk.dat: -------------------------------------------------------------------------------- 1 | lsi(R,BLK) ----------------------------- 2 | capacity load query 3 | 4 2 6.857762 2.447358 4 | 6 3 6.031618 1.859022 5 | 8 4 5.930368 1.510652 6 | 10 5 5.902843 1.623288 7 | 12 6 5.708301 1.618880 8 | 14 7 6.068918 1.709983 9 | 16 8 5.535202 1.677928 10 | 18 9 5.476448 1.722503 11 | 20 10 5.478371 1.708571 12 | 22 11 5.466180 1.773792 13 | 24 12 5.473970 1.828771 14 | 26 13 5.286682 1.805761 15 | 28 14 5.234012 1.881108 16 | 30 15 5.219991 1.938315 17 | 32 16 5.253119 1.986743 18 | 34 17 5.264627 1.985955 19 | 36 18 5.272967 2.025869 20 | 38 19 5.280151 2.102965 21 | 40 20 5.256243 2.026648 22 | 42 21 5.205741 2.185887 23 | 44 22 5.203859 2.265167 24 | 46 23 5.208420 2.291178 25 | 48 24 5.208323 2.368383 26 | 50 25 5.199746 2.178758 27 | 52 26 5.852169 2.505041 28 | 54 27 5.247896 2.615863 29 | 56 28 5.256165 2.535364 30 | 58 29 5.260554 2.567835 31 | 60 30 5.228731 2.751520 32 | 62 31 5.201349 2.760711 33 | 64 32 5.213995 2.703440 34 | 66 33 5.208385 2.826535 35 | 68 34 5.246795 2.887180 36 | 70 35 5.654959 2.858522 37 | 72 36 5.717816 2.953695 38 | 74 37 5.862972 2.914857 39 | 76 38 5.206261 2.867116 40 | 78 39 5.211435 3.019479 41 | 80 40 5.215639 3.039835 42 | 82 41 5.292179 3.078092 43 | 84 42 5.447670 3.044668 44 | 86 43 5.253858 3.132683 45 | 88 44 5.244305 3.218694 46 | 90 45 5.703086 3.222887 47 | 92 46 5.442870 3.368998 48 | 94 47 5.318549 3.317936 49 | 96 48 5.697154 3.422079 50 | 98 49 5.292440 3.294745 51 | 100 50 5.272439 3.487357 52 | 102 51 5.273733 3.498599 53 | 104 52 5.281033 3.560622 54 | 106 53 5.273248 3.588439 55 | 108 54 5.295669 3.739371 56 | 110 55 5.706446 3.760551 57 | 112 56 5.239231 3.714232 58 | 114 57 5.316358 3.921085 59 | 116 58 5.793264 3.833606 60 | 118 59 5.388450 3.947645 61 | 120 60 5.581144 4.090250 62 | 122 61 5.742490 4.092102 63 | 124 62 5.281674 4.189876 64 | 126 63 5.302995 3.947775 65 | 128 64 5.471639 4.022694 66 | 130 65 5.930092 4.233499 67 | 132 66 5.242945 4.209869 68 | 134 67 5.706991 4.324246 69 | 136 68 5.301712 4.269203 70 | 138 69 5.304688 4.454150 71 | 140 70 5.598654 4.518873 72 | 142 71 5.430656 4.628897 73 | 144 72 5.477252 4.531997 74 | 146 73 5.469449 4.572744 75 | 148 74 5.391684 4.644844 76 | 150 75 5.141802 4.540557 77 | 152 76 5.402973 4.735293 78 | 154 77 5.134864 4.690028 79 | 156 78 5.081625 4.848400 80 | 158 79 5.052899 4.952775 81 | 160 80 5.135868 5.652997 82 | 162 81 5.728002 4.927125 83 | 164 82 5.099314 4.939005 84 | 166 83 5.101906 5.156382 85 | 168 84 5.150537 5.124931 86 | 170 85 5.383205 5.162223 87 | 172 86 5.897799 5.197568 88 | 174 87 5.229085 5.570990 89 | 176 88 5.358200 5.171640 90 | 178 89 5.279858 5.310609 91 | 180 90 5.559167 5.311701 92 | 182 91 5.175073 5.406282 93 | 184 92 5.658662 5.449493 94 | 186 93 5.187584 5.437572 95 | 188 94 5.255308 5.609072 96 | 190 95 5.563726 5.809252 97 | 192 96 5.262075 5.732234 98 | 194 97 5.756872 5.822912 99 | 196 98 5.155909 5.835832 100 | 198 99 5.089208 6.027094 101 | 200 100 5.770927 5.734016 102 | -------------------------------------------------------------------------------- /results/2/benchmark_rtree_load_blk_vs_balancing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/2/benchmark_rtree_load_blk_vs_balancing.png -------------------------------------------------------------------------------- /results/2/benchmark_rtree_load_itr_vs_blk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/2/benchmark_rtree_load_itr_vs_blk.png -------------------------------------------------------------------------------- /results/2/benchmark_rtree_load_itr_vs_blk_bgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/2/benchmark_rtree_load_itr_vs_blk_bgi.png -------------------------------------------------------------------------------- /results/2/benchmark_rtree_load_itr_vs_blk_lsi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/2/benchmark_rtree_load_itr_vs_blk_lsi.png -------------------------------------------------------------------------------- /results/2/benchmark_rtree_query_blk_vs_balancing.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/2/benchmark_rtree_query_blk_vs_balancing.png -------------------------------------------------------------------------------- /results/2/benchmark_rtree_query_itr_vs_blk.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/2/benchmark_rtree_query_itr_vs_blk.png -------------------------------------------------------------------------------- /results/2/benchmark_rtree_query_itr_vs_blk_bgi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/2/benchmark_rtree_query_itr_vs_blk_bgi.png -------------------------------------------------------------------------------- /results/2/benchmark_rtree_query_itr_vs_blk_lsi.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/mloskot/spatial_index_benchmark/fe3be20ef18dac0c380df0f4dd34bda4317afbe9/results/2/benchmark_rtree_query_itr_vs_blk_lsi.png -------------------------------------------------------------------------------- /results/2/bgi_linear.dat: -------------------------------------------------------------------------------- 1 | bgi(L,ITR) ----------------------------- 2 | capacity load query 3 | 4 2 1.418686 1.297640 4 | 6 3 1.194125 1.653656 5 | 8 4 1.101883 1.575031 6 | 10 5 1.056629 1.742955 7 | 12 6 1.054656 1.441072 8 | 14 7 1.097599 1.447716 9 | 16 8 1.077264 1.816833 10 | 18 9 1.086389 1.388657 11 | 20 10 1.116488 1.554008 12 | 22 11 1.144685 1.433255 13 | 24 12 1.148905 1.495840 14 | 26 13 1.153913 1.560968 15 | 28 14 1.189724 1.464517 16 | 30 15 1.181127 2.053841 17 | 32 16 1.272312 1.318212 18 | 34 17 1.291264 1.538167 19 | 36 18 1.313642 1.264415 20 | 38 19 1.335851 1.821065 21 | 40 20 1.393191 1.747343 22 | 42 21 1.375371 1.541866 23 | 44 22 1.404065 1.437775 24 | 46 23 1.452205 1.844448 25 | 48 24 1.465685 1.522256 26 | 50 25 1.424754 1.790700 27 | 52 26 1.461269 1.667563 28 | 54 27 1.451005 1.866309 29 | 56 28 1.478311 1.638749 30 | 58 29 1.454831 1.866425 31 | 60 30 1.501015 1.408249 32 | 62 31 1.529705 1.515782 33 | 64 32 1.537438 1.719704 34 | 66 33 1.628524 1.551263 35 | 68 34 1.597644 1.371620 36 | 70 35 1.601280 2.150027 37 | 72 36 1.641733 1.661728 38 | 74 37 1.642295 1.656309 39 | 76 38 1.686828 1.542312 40 | 78 39 1.694804 1.714034 41 | 80 40 1.726339 1.669549 42 | 82 41 1.755476 1.718433 43 | 84 42 1.751870 2.010508 44 | 86 43 1.786171 2.181744 45 | 88 44 1.822056 1.764282 46 | 90 45 1.799364 2.281828 47 | 92 46 1.828587 2.267478 48 | 94 47 1.943392 1.866582 49 | 96 48 1.949689 2.278608 50 | 98 49 2.035548 2.084914 51 | 100 50 2.102346 1.642749 52 | 102 51 2.061544 1.617995 53 | 104 52 2.063226 2.044229 54 | 106 53 2.074561 2.079750 55 | 108 54 2.061350 1.795111 56 | 110 55 2.040398 2.025838 57 | 112 56 2.035319 2.108721 58 | 114 57 2.108575 2.411916 59 | 116 58 2.129474 1.980785 60 | 118 59 2.127695 1.870646 61 | 120 60 2.087504 1.804934 62 | 122 61 2.140632 2.119337 63 | 124 62 2.124668 2.167077 64 | 126 63 2.159826 2.173828 65 | 128 64 2.103364 3.302195 66 | 130 65 2.230450 2.181418 67 | 132 66 2.259567 1.753696 68 | 134 67 2.206760 2.583026 69 | 136 68 2.229542 2.635522 70 | 138 69 2.227711 2.101259 71 | 140 70 2.251178 2.137714 72 | 142 71 2.236002 2.363188 73 | 144 72 2.261852 1.996661 74 | 146 73 2.243698 1.855331 75 | 148 74 2.210589 2.182097 76 | 150 75 2.212532 2.122378 77 | 152 76 2.195871 2.377271 78 | 154 77 2.183214 2.293683 79 | 156 78 2.232870 1.890997 80 | 158 79 2.210685 2.610506 81 | 160 80 2.230748 2.223468 82 | 162 81 2.240479 2.364531 83 | 164 82 2.228463 1.866065 84 | 166 83 2.254798 1.919140 85 | 168 84 2.264449 2.282013 86 | 170 85 2.226150 2.617629 87 | 172 86 2.225937 2.604074 88 | 174 87 2.286663 2.311788 89 | 176 88 2.296361 1.936656 90 | 178 89 2.251206 1.853595 91 | 180 90 2.248043 2.163249 92 | 182 91 2.301549 2.056709 93 | 184 92 2.256762 2.138380 94 | 186 93 2.283975 2.070204 95 | 188 94 2.298191 1.974695 96 | 190 95 2.279410 2.489322 97 | 192 96 2.310689 1.818050 98 | 194 97 2.259119 2.781604 99 | 196 98 2.292615 2.549165 100 | 198 99 2.314542 2.456497 101 | 200 100 2.299243 2.939986 102 | -------------------------------------------------------------------------------- /results/2/bgi_linear_blk.dat: -------------------------------------------------------------------------------- 1 | bgi(L,BLK) ----------------------------- 2 | capacity load query 3 | 4 2 1.443257 0.066185 4 | 6 3 1.406668 0.066444 5 | 8 4 1.442695 0.060195 6 | 10 5 1.376551 0.059631 7 | 12 6 1.523180 0.062035 8 | 14 7 1.453938 0.063125 9 | 16 8 1.352721 0.052075 10 | 18 9 1.262141 0.056078 11 | 20 10 1.279725 0.056669 12 | 22 11 1.266105 0.056992 13 | 24 12 1.290973 0.058205 14 | 26 13 1.221389 0.059761 15 | 28 14 1.235384 0.061690 16 | 30 15 1.238032 0.062298 17 | 32 16 1.246876 0.058733 18 | 34 17 1.233414 0.071159 19 | 36 18 1.259794 0.071022 20 | 38 19 1.245697 0.071540 21 | 40 20 1.262794 0.072221 22 | 42 21 1.237153 0.072419 23 | 44 22 1.235579 0.072979 24 | 46 23 1.228006 0.074225 25 | 48 24 1.205553 0.066832 26 | 50 25 1.197933 0.068459 27 | 52 26 1.192036 0.068513 28 | 54 27 1.176100 0.070686 29 | 56 28 1.182422 0.073707 30 | 58 29 1.231085 0.072309 31 | 60 30 1.257066 0.072421 32 | 62 31 1.211229 0.076932 33 | 64 32 1.208943 0.083828 34 | 66 33 1.255715 0.087259 35 | 68 34 1.240117 0.085434 36 | 70 35 1.205052 0.088314 37 | 72 36 1.207498 0.089382 38 | 74 37 1.210437 0.093022 39 | 76 38 1.213454 0.089756 40 | 78 39 1.199427 0.090885 41 | 80 40 1.196132 0.096269 42 | 82 41 1.171636 0.091532 43 | 84 42 1.170087 0.088218 44 | 86 43 1.180766 0.089020 45 | 88 44 1.175661 0.089278 46 | 90 45 1.278276 0.091826 47 | 92 46 1.306059 0.090625 48 | 94 47 1.234076 0.101617 49 | 96 48 1.362469 0.091241 50 | 98 49 1.272375 0.094511 51 | 100 50 1.156596 0.098891 52 | 102 51 1.141240 0.096701 53 | 104 52 1.122727 0.097969 54 | 106 53 1.127392 0.098131 55 | 108 54 1.132965 0.100571 56 | 110 55 1.120574 0.096180 57 | 112 56 1.128186 0.095943 58 | 114 57 1.131532 0.096145 59 | 116 58 1.138771 0.097887 60 | 118 59 1.137491 0.095010 61 | 120 60 1.134280 0.094244 62 | 122 61 1.140420 0.093075 63 | 124 62 1.143211 0.095699 64 | 126 63 1.167634 0.104490 65 | 128 64 1.146605 0.092175 66 | 130 65 1.134688 0.095691 67 | 132 66 1.135992 0.101813 68 | 134 67 1.130318 0.099033 69 | 136 68 1.125106 0.100966 70 | 138 69 1.120673 0.102613 71 | 140 70 1.120001 0.104837 72 | 142 71 1.118769 0.107414 73 | 144 72 1.119340 0.105991 74 | 146 73 1.129534 0.110911 75 | 148 74 1.131994 0.112422 76 | 150 75 1.132146 0.112956 77 | 152 76 1.109931 0.110260 78 | 154 77 1.108056 0.113908 79 | 156 78 1.114916 0.114409 80 | 158 79 1.141846 0.128222 81 | 160 80 1.157602 0.128293 82 | 162 81 1.155384 0.132331 83 | 164 82 1.152222 0.136172 84 | 166 83 1.156606 0.132686 85 | 168 84 1.153814 0.133721 86 | 170 85 1.150161 0.137450 87 | 172 86 1.154597 0.136157 88 | 174 87 1.154649 0.137000 89 | 176 88 1.152907 0.136151 90 | 178 89 1.165792 0.139312 91 | 180 90 1.149044 0.140580 92 | 182 91 1.158162 0.140932 93 | 184 92 1.145239 0.141795 94 | 186 93 1.137134 0.141306 95 | 188 94 1.142262 0.143443 96 | 190 95 1.139902 0.144358 97 | 192 96 1.147134 0.143658 98 | 194 97 1.141134 0.147317 99 | 196 98 1.144891 0.145919 100 | 198 99 1.135441 0.149115 101 | 200 100 1.122359 0.145919 102 | -------------------------------------------------------------------------------- /results/2/bgi_quadratic.dat: -------------------------------------------------------------------------------- 1 | bgi(Q,ITR) ----------------------------- 2 | capacity load query 3 | 4 2 1.772904 0.282153 4 | 6 3 1.507327 0.477647 5 | 8 4 1.427422 0.525902 6 | 10 5 1.440759 0.380220 7 | 12 6 1.444969 0.517922 8 | 14 7 1.509073 0.383954 9 | 16 8 1.614034 0.402698 10 | 18 9 1.599675 0.284238 11 | 20 10 1.699104 0.325680 12 | 22 11 1.721722 0.299669 13 | 24 12 1.777220 0.317572 14 | 26 13 1.824662 0.341068 15 | 28 14 1.926197 0.246629 16 | 30 15 1.973396 0.273917 17 | 32 16 2.030401 0.323216 18 | 34 17 2.091960 0.297482 19 | 36 18 2.162666 0.277622 20 | 38 19 2.219003 0.277569 21 | 40 20 2.257734 0.321688 22 | 42 21 2.319151 0.271265 23 | 44 22 2.381210 0.308082 24 | 46 23 2.398837 0.320201 25 | 48 24 2.441741 0.282932 26 | 50 25 2.499843 0.267647 27 | 52 26 2.535356 0.362347 28 | 54 27 2.571127 0.325451 29 | 56 28 2.618829 0.297702 30 | 58 29 2.646862 0.293325 31 | 60 30 2.712172 0.289951 32 | 62 31 2.741378 0.298923 33 | 64 32 2.824808 0.328186 34 | 66 33 2.880532 0.283041 35 | 68 34 2.915538 0.295441 36 | 70 35 2.989863 0.243695 37 | 72 36 3.052258 0.308897 38 | 74 37 3.081880 0.327073 39 | 76 38 3.094659 0.307684 40 | 78 39 3.178860 0.265097 41 | 80 40 3.239525 0.253654 42 | 82 41 3.277078 0.245893 43 | 84 42 3.337336 0.280570 44 | 86 43 3.410621 0.324597 45 | 88 44 3.473032 0.372393 46 | 90 45 3.547787 0.363304 47 | 92 46 3.563863 0.285499 48 | 94 47 3.637273 0.314443 49 | 96 48 3.687475 0.276304 50 | 98 49 3.706055 0.345007 51 | 100 50 3.793033 0.271263 52 | 102 51 3.839099 0.324013 53 | 104 52 3.868480 0.354132 54 | 106 53 3.978514 0.316488 55 | 108 54 3.956990 0.331141 56 | 110 55 4.029986 0.306495 57 | 112 56 4.053533 0.298434 58 | 114 57 4.110109 0.266555 59 | 116 58 4.153841 0.298571 60 | 118 59 4.215990 0.241501 61 | 120 60 4.236247 0.273006 62 | 122 61 4.308320 0.276268 63 | 124 62 4.399613 0.264014 64 | 126 63 4.421065 0.284067 65 | 128 64 4.449339 0.297341 66 | 130 65 4.462669 0.296505 67 | 132 66 4.533303 0.315250 68 | 134 67 4.512656 0.298193 69 | 136 68 4.551789 0.287153 70 | 138 69 4.595019 0.337694 71 | 140 70 4.622970 0.284799 72 | 142 71 4.652754 0.300009 73 | 144 72 4.661324 0.346775 74 | 146 73 4.682879 0.333312 75 | 148 74 4.714910 0.336107 76 | 150 75 4.724805 0.341619 77 | 152 76 4.789732 0.311305 78 | 154 77 4.789700 0.330528 79 | 156 78 4.809922 0.305597 80 | 158 79 4.864741 0.318545 81 | 160 80 4.931650 0.313886 82 | 162 81 4.967063 0.389749 83 | 164 82 5.043460 0.334299 84 | 166 83 5.092358 0.362022 85 | 168 84 5.079057 0.365611 86 | 170 85 5.117407 0.344640 87 | 172 86 5.106271 0.348990 88 | 174 87 5.112463 0.294584 89 | 176 88 5.379788 0.330674 90 | 178 89 5.269388 0.340151 91 | 180 90 5.286064 0.342829 92 | 182 91 5.415707 0.331844 93 | 184 92 5.518009 0.309098 94 | 186 93 5.332122 0.309960 95 | 188 94 5.418382 0.336401 96 | 190 95 5.490176 0.306827 97 | 192 96 5.488129 0.334718 98 | 194 97 5.545404 0.344530 99 | 196 98 5.636433 0.291724 100 | 198 99 5.742815 0.358515 101 | 200 100 5.613701 0.331480 102 | -------------------------------------------------------------------------------- /results/2/bgi_quadratic_blk.dat: -------------------------------------------------------------------------------- 1 | bgi(Q,BLK) ----------------------------- 2 | capacity load query 3 | 4 2 1.378500 0.088468 4 | 6 3 1.320256 0.063838 5 | 8 4 1.335436 0.060972 6 | 10 5 1.288886 0.060291 7 | 12 6 1.245233 0.057786 8 | 14 7 1.255381 0.068838 9 | 16 8 1.324263 0.058898 10 | 18 9 1.233233 0.064725 11 | 20 10 1.208837 0.068652 12 | 22 11 1.153540 0.054658 13 | 24 12 1.176569 0.056812 14 | 26 13 1.145090 0.059245 15 | 28 14 1.159793 0.060818 16 | 30 15 1.166012 0.059680 17 | 32 16 1.186788 0.057622 18 | 34 17 1.187552 0.061288 19 | 36 18 1.137982 0.062755 20 | 38 19 1.158178 0.062802 21 | 40 20 1.142731 0.059514 22 | 42 21 1.238599 0.075638 23 | 44 22 1.273936 0.061758 24 | 46 23 1.102413 0.065125 25 | 48 24 1.117831 0.064133 26 | 50 25 1.109016 0.064913 27 | 52 26 1.123782 0.065948 28 | 54 27 1.090923 0.067291 29 | 56 28 1.087372 0.068424 30 | 58 29 1.102421 0.068913 31 | 60 30 1.091840 0.072180 32 | 62 31 1.099603 0.070592 33 | 64 32 1.116765 0.072306 34 | 66 33 1.128618 0.072876 35 | 68 34 1.127550 0.072093 36 | 70 35 1.084944 0.076400 37 | 72 36 1.082497 0.075982 38 | 74 37 1.086885 0.076476 39 | 76 38 1.079836 0.077376 40 | 78 39 1.085615 0.082095 41 | 80 40 1.081139 0.081133 42 | 82 41 1.085145 0.082659 43 | 84 42 1.087229 0.083199 44 | 86 43 1.090994 0.084301 45 | 88 44 1.094102 0.084769 46 | 90 45 1.096327 0.085872 47 | 92 46 1.083099 0.086500 48 | 94 47 1.083689 0.087286 49 | 96 48 1.077565 0.087135 50 | 98 49 1.070010 0.087937 51 | 100 50 1.062341 0.092868 52 | 102 51 1.064583 0.092560 53 | 104 52 1.058653 0.092708 54 | 106 53 1.061622 0.092563 55 | 108 54 1.053139 0.092834 56 | 110 55 1.070025 0.092576 57 | 112 56 1.074712 0.096555 58 | 114 57 1.056143 0.092969 59 | 116 58 1.055436 0.090903 60 | 118 59 1.061855 0.091283 61 | 120 60 1.057732 0.089290 62 | 122 61 1.062411 0.088325 63 | 124 62 1.064993 0.088858 64 | 126 63 1.072287 0.087715 65 | 128 64 1.066005 0.088261 66 | 130 65 1.061716 0.090882 67 | 132 66 1.054868 0.092375 68 | 134 67 1.053975 0.093341 69 | 136 68 1.050814 0.095516 70 | 138 69 1.046048 0.102613 71 | 140 70 1.046435 0.097982 72 | 142 71 1.043460 0.099339 73 | 144 72 1.043783 0.100598 74 | 146 73 1.038497 0.102731 75 | 148 74 1.032874 0.104749 76 | 150 75 1.034877 0.112707 77 | 152 76 1.038902 0.106709 78 | 154 77 1.032608 0.107621 79 | 156 78 1.033315 0.107043 80 | 158 79 1.037224 0.107201 81 | 160 80 1.039445 0.108608 82 | 162 81 1.035070 0.110677 83 | 164 82 1.032434 0.110730 84 | 166 83 1.034183 0.111972 85 | 168 84 1.039016 0.112453 86 | 170 85 1.038103 0.114816 87 | 172 86 1.032351 0.113604 88 | 174 87 1.040916 0.115782 89 | 176 88 1.038071 0.113958 90 | 178 89 1.045349 0.121346 91 | 180 90 1.030452 0.117231 92 | 182 91 1.036468 0.116931 93 | 184 92 1.027157 0.117956 94 | 186 93 1.025063 0.118994 95 | 188 94 1.024340 0.119100 96 | 190 95 1.023748 0.120056 97 | 192 96 1.030630 0.121990 98 | 194 97 1.020823 0.122067 99 | 196 98 1.019172 0.121907 100 | 198 99 1.019254 0.122114 101 | 200 100 1.012834 0.124294 102 | -------------------------------------------------------------------------------- /results/2/bgi_rstar.dat: -------------------------------------------------------------------------------- 1 | bgi(R,ITR) ----------------------------- 2 | capacity load query 3 | 4 2 3.716490 0.255794 4 | 6 3 2.946155 0.146962 5 | 8 4 3.106149 0.150325 6 | 10 5 3.323989 0.181212 7 | 12 6 3.270153 0.176208 8 | 14 7 3.544724 0.095017 9 | 16 8 3.631338 0.103877 10 | 18 9 4.031356 0.142907 11 | 20 10 4.384577 0.142622 12 | 22 11 4.476705 0.152903 13 | 24 12 4.850835 0.138651 14 | 26 13 4.946305 0.129113 15 | 28 14 5.352113 0.122534 16 | 30 15 5.654495 0.119336 17 | 32 16 5.769136 0.104005 18 | 34 17 6.437310 0.124192 19 | 36 18 6.642324 0.125656 20 | 38 19 7.082777 0.114454 21 | 40 20 7.611190 0.133138 22 | 42 21 7.525911 0.110875 23 | 44 22 7.919869 0.121350 24 | 46 23 7.915684 0.115668 25 | 48 24 8.214297 0.112392 26 | 50 25 8.510425 0.116410 27 | 52 26 8.461917 0.111840 28 | 54 27 8.788527 0.118057 29 | 56 28 8.715638 0.116082 30 | 58 29 8.985001 0.113701 31 | 60 30 9.208828 0.106952 32 | 62 31 9.096734 0.120977 33 | 64 32 9.400174 0.116951 34 | 66 33 9.260637 0.113879 35 | 68 34 9.467281 0.116709 36 | 70 35 9.632940 0.118635 37 | 72 36 9.509976 0.112288 38 | 74 37 9.760286 0.111209 39 | 76 38 9.609119 0.118233 40 | 78 39 9.653954 0.125297 41 | 80 40 9.930672 0.117538 42 | 82 41 9.896020 0.122155 43 | 84 42 9.971128 0.123431 44 | 86 43 9.954942 0.123360 45 | 88 44 10.012001 0.118357 46 | 90 45 10.148927 0.116808 47 | 92 46 10.003753 0.117551 48 | 94 47 10.274328 0.121984 49 | 96 48 10.126278 0.124242 50 | 98 49 10.266315 0.121863 51 | 100 50 10.431197 0.136186 52 | 102 51 10.167517 0.129154 53 | 104 52 10.435282 0.131726 54 | 106 53 10.430710 0.126419 55 | 108 54 10.600748 0.127442 56 | 110 55 10.608825 0.125589 57 | 112 56 10.507260 0.123100 58 | 114 57 10.695138 0.146837 59 | 116 58 10.785551 0.124403 60 | 118 59 10.815326 0.130494 61 | 120 60 10.964468 0.130151 62 | 122 61 10.782182 0.149897 63 | 124 62 11.081463 0.145837 64 | 126 63 10.778448 0.145969 65 | 128 64 10.934500 0.150328 66 | 130 65 11.064676 0.149401 67 | 132 66 10.986042 0.146854 68 | 134 67 11.118406 0.147467 69 | 136 68 11.043613 0.145538 70 | 138 69 11.018825 0.146191 71 | 140 70 11.280374 0.145262 72 | 142 71 11.041605 0.147575 73 | 144 72 11.275967 0.145200 74 | 146 73 11.178758 0.145397 75 | 148 74 11.233535 0.152772 76 | 150 75 11.353385 0.151340 77 | 152 76 11.350171 0.150854 78 | 154 77 11.302911 0.153089 79 | 156 78 11.248260 0.168595 80 | 158 79 11.444925 0.168012 81 | 160 80 11.538932 0.175616 82 | 162 81 11.636531 0.180663 83 | 164 82 11.508414 0.166784 84 | 166 83 11.608843 0.163506 85 | 168 84 11.862983 0.168620 86 | 170 85 11.823420 0.181871 87 | 172 86 11.874040 0.171079 88 | 174 87 12.124436 0.171083 89 | 176 88 11.911029 0.179959 90 | 178 89 12.279284 0.171233 91 | 180 90 12.139531 0.173129 92 | 182 91 11.986573 0.172797 93 | 184 92 12.170960 0.166750 94 | 186 93 12.251224 0.185964 95 | 188 94 12.417258 0.186798 96 | 190 95 12.348258 0.173282 97 | 192 96 12.672507 0.180749 98 | 194 97 12.412798 0.181359 99 | 196 98 12.237732 0.177356 100 | 198 99 12.617113 0.164439 101 | 200 100 12.945377 0.168911 102 | -------------------------------------------------------------------------------- /results/2/bgi_rstar_blk.dat: -------------------------------------------------------------------------------- 1 | bgi(R,BLK) ----------------------------- 2 | capacity load query 3 | 4 2 1.393755 0.064170 4 | 6 3 1.305483 0.053811 5 | 8 4 1.309994 0.050201 6 | 10 5 1.244707 0.050990 7 | 12 6 1.226986 0.052030 8 | 14 7 1.238370 0.054708 9 | 16 8 1.267838 0.052829 10 | 18 9 1.209455 0.055811 11 | 20 10 1.212318 0.056001 12 | 22 11 1.193608 0.056334 13 | 24 12 1.236052 0.057005 14 | 26 13 1.181195 0.059346 15 | 28 14 1.210764 0.060406 16 | 30 15 1.206003 0.059974 17 | 32 16 1.211399 0.056518 18 | 34 17 1.179279 0.062097 19 | 36 18 1.173653 0.059671 20 | 38 19 1.166211 0.059759 21 | 40 20 1.180984 0.058718 22 | 42 21 1.152152 0.061480 23 | 44 22 1.159491 0.063966 24 | 46 23 1.149866 0.062566 25 | 48 24 1.166100 0.065417 26 | 50 25 1.162637 0.065214 27 | 52 26 1.179583 0.067496 28 | 54 27 1.154159 0.067836 29 | 56 28 1.144663 0.067740 30 | 58 29 1.160753 0.069932 31 | 60 30 1.150441 0.077202 32 | 62 31 1.146899 0.075665 33 | 64 32 1.158940 0.078265 34 | 66 33 1.177247 0.078997 35 | 68 34 1.163218 0.080235 36 | 70 35 1.127673 0.082095 37 | 72 36 1.125282 0.080546 38 | 74 37 1.136808 0.084131 39 | 76 38 1.124142 0.081689 40 | 78 39 1.136715 0.084293 41 | 80 40 1.127747 0.088167 42 | 82 41 1.139027 0.089509 43 | 84 42 1.132391 0.088248 44 | 86 43 1.155330 0.093723 45 | 88 44 1.140120 0.089508 46 | 90 45 1.139745 0.094730 47 | 92 46 1.125539 0.093363 48 | 94 47 1.132820 0.099777 49 | 96 48 1.121699 0.092639 50 | 98 49 1.115748 0.093905 51 | 100 50 1.113398 0.096800 52 | 102 51 1.112395 0.099472 53 | 104 52 1.113222 0.098134 54 | 106 53 1.098843 0.099562 55 | 108 54 1.096696 0.097030 56 | 110 55 1.103085 0.098537 57 | 112 56 1.109968 0.100534 58 | 114 57 1.101053 0.099295 59 | 116 58 1.096111 0.099695 60 | 118 59 1.099570 0.100402 61 | 120 60 1.111588 0.106812 62 | 122 61 1.150452 0.104903 63 | 124 62 1.128954 0.094215 64 | 126 63 1.171798 0.104673 65 | 128 64 1.168232 0.101518 66 | 130 65 1.150858 0.108688 67 | 132 66 1.115484 0.109437 68 | 134 67 1.129686 0.106785 69 | 136 68 1.106049 0.096256 70 | 138 69 1.102922 0.100230 71 | 140 70 1.113057 0.100421 72 | 142 71 1.099707 0.099188 73 | 144 72 1.101701 0.100844 74 | 146 73 1.089765 0.101158 75 | 148 74 1.093415 0.102254 76 | 150 75 1.083677 0.105770 77 | 152 76 1.090749 0.102186 78 | 154 77 1.080021 0.105021 79 | 156 78 1.066436 0.103568 80 | 158 79 1.092646 0.106443 81 | 160 80 1.078212 0.108109 82 | 162 81 1.088627 0.109750 83 | 164 82 1.078303 0.110182 84 | 166 83 1.078003 0.111310 85 | 168 84 1.082923 0.115879 86 | 170 85 1.086273 0.112126 87 | 172 86 1.073830 0.115369 88 | 174 87 1.080215 0.113725 89 | 176 88 1.087643 0.115851 90 | 178 89 1.099306 0.119542 91 | 180 90 1.072171 0.113751 92 | 182 91 1.090686 0.113632 93 | 184 92 1.074267 0.118332 94 | 186 93 1.078620 0.118127 95 | 188 94 1.076539 0.123785 96 | 190 95 1.069975 0.120312 97 | 192 96 1.084042 0.118220 98 | 194 97 1.072006 0.121334 99 | 196 98 1.062814 0.124492 100 | 198 99 1.067708 0.126075 101 | 200 100 1.057864 0.124148 102 | -------------------------------------------------------------------------------- /results/2/lsi_linear.dat: -------------------------------------------------------------------------------- 1 | lsi(L,ITR) ----------------------------- 2 | capacity load query 3 | 4 2 13.634569 16.790688 4 | 6 3 13.100088 27.435612 5 | 8 4 13.351699 19.246976 6 | 10 5 13.331143 22.704354 7 | 12 6 13.677523 27.837720 8 | 14 7 14.183594 23.079995 9 | 16 8 14.807816 30.617846 10 | 18 9 15.325992 22.895684 11 | 20 10 15.957143 38.166111 12 | 22 11 16.283386 39.253949 13 | 24 12 16.862714 29.337094 14 | 26 13 16.866687 28.980240 15 | 28 14 16.887156 25.433422 16 | 30 15 17.093962 43.588474 17 | 32 16 17.875572 35.968747 18 | 34 17 18.431803 34.843885 19 | 36 18 18.927957 41.563321 20 | 38 19 19.391124 34.278073 21 | 40 20 19.822851 38.911639 22 | 42 21 19.508663 33.757890 23 | 44 22 21.029378 40.003246 24 | 46 23 20.583119 40.062607 25 | 48 24 20.565194 44.895679 26 | 50 25 21.380824 56.483126 27 | 52 26 21.156783 44.944185 28 | 54 27 21.396769 51.622956 29 | 56 28 21.572397 48.177951 30 | 58 29 21.802767 41.144298 31 | 60 30 22.140782 45.964839 32 | 62 31 23.153819 45.643195 33 | 64 32 24.171156 52.557245 34 | 66 33 25.214048 48.567859 35 | 68 34 24.005824 50.073775 36 | 70 35 24.461713 51.819738 37 | 72 36 25.260147 53.990995 38 | 74 37 24.925191 45.194534 39 | 76 38 25.887119 44.181311 40 | 78 39 26.102991 52.352795 41 | 80 40 27.157596 61.493776 42 | 82 41 27.886780 52.274430 43 | 84 42 27.519860 72.127422 44 | 86 43 27.842388 68.486857 45 | 88 44 29.128049 64.074370 46 | 90 45 29.800139 62.042672 47 | 92 46 29.774498 60.638696 48 | 94 47 30.710265 62.843983 49 | 96 48 31.024003 65.365086 50 | 98 49 31.234509 64.229783 51 | 100 50 32.296986 64.051713 52 | 102 51 32.755855 69.742742 53 | 104 52 32.310341 72.204487 54 | 106 53 33.013117 71.926100 55 | 108 54 33.472152 57.304369 56 | 110 55 33.430580 71.070828 57 | 112 56 33.850487 79.990367 58 | 114 57 34.668736 82.657421 59 | 116 58 34.559546 63.762356 60 | 118 59 35.242759 79.105210 61 | 120 60 35.927891 93.630645 62 | 122 61 36.234452 79.158742 63 | 124 62 36.276780 74.679743 64 | 126 63 36.265039 61.158771 65 | 128 64 36.464266 77.712494 66 | 130 65 36.461588 69.124223 67 | 132 66 36.772336 80.032532 68 | 134 67 37.988501 90.743855 69 | 136 68 37.966167 94.449014 70 | 138 69 39.490702 88.808887 71 | 140 70 38.441164 80.093054 72 | 142 71 38.034516 79.609891 73 | 144 72 38.132106 93.918279 74 | 146 73 39.481717 78.250312 75 | 148 74 39.289150 90.657240 76 | 150 75 38.898634 98.151355 77 | 152 76 39.293070 99.619121 78 | 154 77 39.299814 99.817186 79 | 156 78 39.512357 71.616851 80 | 158 79 39.438094 127.310231 81 | 160 80 40.470664 93.784629 82 | 162 81 40.845990 98.652228 83 | 164 82 40.503391 114.001557 84 | 166 83 41.009641 97.586126 85 | 168 84 42.265434 82.603261 86 | 170 85 41.160437 100.679917 87 | 172 86 41.014083 107.158680 88 | 174 87 40.106571 131.832984 89 | 176 88 41.698383 88.467310 90 | 178 89 41.920231 92.345511 91 | 180 90 41.474255 101.548712 92 | 182 91 43.692215 117.964734 93 | 184 92 43.196576 93.714788 94 | 186 93 42.619073 95.837062 95 | 188 94 44.713851 86.855596 96 | 190 95 44.198945 112.073031 97 | 192 96 43.879146 86.678193 98 | 194 97 44.008107 116.509497 99 | 196 98 44.208889 112.170786 100 | 198 99 44.690092 132.305794 101 | 200 100 46.020578 105.957680 102 | -------------------------------------------------------------------------------- /results/2/lsi_linear_blk.dat: -------------------------------------------------------------------------------- 1 | lsi(L,BLK) ----------------------------- 2 | capacity load query 3 | 4 2 7.299464 2.451570 4 | 6 3 6.635653 1.814529 5 | 8 4 5.888148 1.458394 6 | 10 5 5.759171 1.636253 7 | 12 6 5.500010 1.571044 8 | 14 7 5.436017 1.715646 9 | 16 8 5.786710 1.625092 10 | 18 9 5.346512 1.708641 11 | 20 10 5.395681 1.703772 12 | 22 11 5.484671 1.756194 13 | 24 12 5.341181 1.786111 14 | 26 13 5.299001 1.806224 15 | 28 14 5.527343 1.907979 16 | 30 15 5.288934 1.936986 17 | 32 16 5.274585 1.975702 18 | 34 17 5.873109 2.012560 19 | 36 18 5.256375 2.016842 20 | 38 19 5.291801 2.088630 21 | 40 20 5.244815 2.054080 22 | 42 21 5.250685 2.212709 23 | 44 22 5.247473 2.262375 24 | 46 23 5.241946 2.311771 25 | 48 24 5.242396 2.388599 26 | 50 25 5.750860 2.222379 27 | 52 26 5.327461 2.483490 28 | 54 27 5.395086 2.590678 29 | 56 28 5.175193 2.520333 30 | 58 29 5.150738 2.523028 31 | 60 30 5.655791 2.743947 32 | 62 31 5.204139 2.758747 33 | 64 32 5.734869 2.727191 34 | 66 33 5.175500 2.802486 35 | 68 34 5.204621 2.800940 36 | 70 35 5.189606 2.807750 37 | 72 36 5.193110 2.885541 38 | 74 37 5.159000 2.909098 39 | 76 38 5.183432 2.889483 40 | 78 39 5.174462 2.985258 41 | 80 40 5.178155 2.973645 42 | 82 41 5.257845 3.019032 43 | 84 42 5.322498 2.978223 44 | 86 43 5.362163 3.260089 45 | 88 44 5.716547 3.106379 46 | 90 45 5.147294 3.197368 47 | 92 46 5.656001 3.240197 48 | 94 47 5.102453 3.205186 49 | 96 48 5.126529 3.374957 50 | 98 49 5.184422 3.302660 51 | 100 50 5.157699 3.432267 52 | 102 51 5.123584 3.431541 53 | 104 52 5.114899 3.554185 54 | 106 53 5.701247 3.558934 55 | 108 54 5.130558 3.643725 56 | 110 55 5.151800 3.676462 57 | 112 56 5.636819 3.690419 58 | 114 57 5.296533 3.742379 59 | 116 58 5.410751 3.790864 60 | 118 59 5.096573 3.828569 61 | 120 60 5.117908 3.880507 62 | 122 61 5.093893 3.967591 63 | 124 62 5.102301 4.104065 64 | 126 63 5.102077 3.811332 65 | 128 64 5.097776 3.955507 66 | 130 65 5.089146 4.106372 67 | 132 66 5.129487 4.154836 68 | 134 67 5.834322 4.261292 69 | 136 68 5.140413 4.216738 70 | 138 69 5.675717 4.383467 71 | 140 70 5.233593 4.550729 72 | 142 71 5.820657 4.475514 73 | 144 72 5.218363 4.489494 74 | 146 73 5.444801 4.400017 75 | 148 74 5.111075 4.586343 76 | 150 75 5.135752 4.533923 77 | 152 76 5.146290 4.579037 78 | 154 77 5.147259 4.702180 79 | 156 78 5.184124 4.826286 80 | 158 79 5.173014 4.931949 81 | 160 80 5.169772 5.550079 82 | 162 81 5.178048 4.990694 83 | 164 82 5.266823 5.124240 84 | 166 83 5.772416 5.205406 85 | 168 84 5.143695 5.048302 86 | 170 85 5.690926 5.130671 87 | 172 86 5.159941 5.119726 88 | 174 87 5.684690 5.487412 89 | 176 88 5.209185 5.226001 90 | 178 89 5.403683 5.205242 91 | 180 90 5.173483 5.334095 92 | 182 91 5.893575 5.525280 93 | 184 92 5.765579 5.434966 94 | 186 93 5.154331 5.458801 95 | 188 94 5.154288 5.719410 96 | 190 95 5.148295 5.874860 97 | 192 96 5.777187 5.736454 98 | 194 97 5.178189 5.920090 99 | 196 98 5.697646 5.867914 100 | 198 99 5.144806 6.030492 101 | 200 100 5.159467 5.754019 102 | -------------------------------------------------------------------------------- /results/2/lsi_quadratic.dat: -------------------------------------------------------------------------------- 1 | lsi(Q,ITR) ----------------------------- 2 | capacity load query 3 | 4 2 15.509916 2.940053 4 | 6 3 15.520475 6.243644 5 | 8 4 15.963357 7.364895 6 | 10 5 16.936403 5.934927 7 | 12 6 18.196532 8.683129 8 | 14 7 18.935247 6.467938 9 | 16 8 19.558684 6.648143 10 | 18 9 20.442606 5.339081 11 | 20 10 20.942437 6.380909 12 | 22 11 22.201175 6.262383 13 | 24 12 22.943495 6.545252 14 | 26 13 23.079773 7.467242 15 | 28 14 23.653065 5.224604 16 | 30 15 24.937766 6.177127 17 | 32 16 26.904593 7.994063 18 | 34 17 27.020812 6.610416 19 | 36 18 27.907781 6.121937 20 | 38 19 29.537168 6.491103 21 | 40 20 29.881862 7.719552 22 | 42 21 29.892654 6.468334 23 | 44 22 30.552056 7.267998 24 | 46 23 32.536726 7.704806 25 | 48 24 31.602261 7.035919 26 | 50 25 32.523103 6.645982 27 | 52 26 35.918725 9.192911 28 | 54 27 34.073538 8.230138 29 | 56 28 35.183929 8.003847 30 | 58 29 36.411322 7.387666 31 | 60 30 35.924178 7.702462 32 | 62 31 37.219414 8.128699 33 | 64 32 40.850603 8.836298 34 | 66 33 38.811981 7.478723 35 | 68 34 41.019848 8.155941 36 | 70 35 40.746042 6.777515 37 | 72 36 42.149596 8.711287 38 | 74 37 41.690853 9.920657 39 | 76 38 43.331554 10.248647 40 | 78 39 45.028816 8.547762 41 | 80 40 44.465243 7.906619 42 | 82 41 46.091746 7.894711 43 | 84 42 47.111473 9.260250 44 | 86 43 46.561986 9.631387 45 | 88 44 47.325266 11.817504 46 | 90 45 48.304414 11.522845 47 | 92 46 49.329524 8.622341 48 | 94 47 50.649593 9.886139 49 | 96 48 51.554153 8.386222 50 | 98 49 53.733187 9.933878 51 | 100 50 53.180395 8.613234 52 | 102 51 53.480950 10.585343 53 | 104 52 54.863830 11.836555 54 | 106 53 56.167773 10.118785 55 | 108 54 56.008495 11.132944 56 | 110 55 56.726761 9.650988 57 | 112 56 58.658362 9.727494 58 | 114 57 59.547996 8.729314 59 | 116 58 60.197478 10.081244 60 | 118 59 62.547730 7.984752 61 | 120 60 62.611786 9.540959 62 | 122 61 63.210880 9.539133 63 | 124 62 63.199067 9.110467 64 | 126 63 65.048079 9.564725 65 | 128 64 65.177307 10.094525 66 | 130 65 66.269210 10.183122 67 | 132 66 65.922561 11.163907 68 | 134 67 67.688962 10.322551 69 | 136 68 67.601617 9.859212 70 | 138 69 68.431585 11.661075 71 | 140 70 68.589228 10.378918 72 | 142 71 70.538240 10.202146 73 | 144 72 76.052389 12.098467 74 | 146 73 70.540039 11.394538 75 | 148 74 73.247019 11.709110 76 | 150 75 71.274247 11.538871 77 | 152 76 72.970140 10.874691 78 | 154 77 72.038646 11.573943 79 | 156 78 74.180317 10.767992 80 | 158 79 74.027104 11.696304 81 | 160 80 75.034662 10.800436 82 | 162 81 74.979124 13.589059 83 | 164 82 76.927551 11.483988 84 | 166 83 75.997167 11.736452 85 | 168 84 76.960802 13.642073 86 | 170 85 79.371900 12.377375 87 | 172 86 83.770970 12.550874 88 | 174 87 82.655333 12.047038 89 | 176 88 81.477196 13.761169 90 | 178 89 84.676601 14.088838 91 | 180 90 86.409351 12.342870 92 | 182 91 83.936259 12.462673 93 | 184 92 82.822282 12.369762 94 | 186 93 83.780682 12.903445 95 | 188 94 85.775198 12.108672 96 | 190 95 86.134069 11.213517 97 | 192 96 84.970754 12.413107 98 | 194 97 85.213477 12.127260 99 | 196 98 87.170235 11.776963 100 | 198 99 89.685826 13.608206 101 | 200 100 87.926061 12.579272 102 | -------------------------------------------------------------------------------- /results/2/lsi_quadratic_blk.dat: -------------------------------------------------------------------------------- 1 | lsi(Q,BLK) ----------------------------- 2 | capacity load query 3 | 4 2 6.985771 2.328701 4 | 6 3 5.971351 1.786357 5 | 8 4 5.692616 1.486939 6 | 10 5 5.588577 1.588414 7 | 12 6 5.443509 1.544496 8 | 14 7 5.379466 1.664528 9 | 16 8 5.317415 1.582111 10 | 18 9 5.287672 1.671138 11 | 20 10 5.278605 1.660054 12 | 22 11 5.271090 1.722147 13 | 24 12 5.254501 1.755150 14 | 26 13 5.482520 1.781400 15 | 28 14 5.229129 1.888869 16 | 30 15 5.416113 1.905143 17 | 32 16 5.314091 1.918958 18 | 34 17 5.239094 1.989089 19 | 36 18 5.256201 1.986198 20 | 38 19 5.189237 2.049874 21 | 40 20 5.204889 2.018341 22 | 42 21 5.194947 2.187579 23 | 44 22 5.175438 2.208516 24 | 46 23 5.179811 2.291885 25 | 48 24 5.179543 2.336619 26 | 50 25 5.175891 2.176228 27 | 52 26 5.179361 2.427649 28 | 54 27 5.178185 2.563616 29 | 56 28 5.168736 2.515444 30 | 58 29 5.173249 2.533721 31 | 60 30 5.176081 2.751782 32 | 62 31 5.180159 2.736073 33 | 64 32 5.195405 2.678813 34 | 66 33 5.172168 2.778499 35 | 68 34 5.183107 2.790787 36 | 70 35 5.179854 2.785961 37 | 72 36 5.180512 2.868724 38 | 74 37 5.180873 2.890316 39 | 76 38 5.185761 2.890794 40 | 78 39 5.177922 2.967160 41 | 80 40 5.178504 2.965894 42 | 82 41 5.187332 3.019882 43 | 84 42 5.319060 2.970856 44 | 86 43 5.209511 3.133652 45 | 88 44 5.298475 3.114863 46 | 90 45 5.187673 3.190406 47 | 92 46 5.199481 3.252673 48 | 94 47 5.226782 3.288423 49 | 96 48 5.537777 3.398845 50 | 98 49 5.207698 3.308199 51 | 100 50 5.290521 3.490593 52 | 102 51 5.749833 3.481817 53 | 104 52 5.200914 3.588935 54 | 106 53 5.280282 3.570711 55 | 108 54 5.245392 3.702694 56 | 110 55 5.286241 3.797112 57 | 112 56 5.324353 3.754537 58 | 114 57 5.209968 3.859177 59 | 116 58 5.247021 3.831182 60 | 118 59 5.195456 3.827371 61 | 120 60 5.161259 3.896643 62 | 122 61 5.214582 4.054782 63 | 124 62 5.344584 4.213249 64 | 126 63 5.300194 3.852938 65 | 128 64 5.579763 3.990964 66 | 130 65 5.177028 4.146051 67 | 132 66 5.183931 4.208518 68 | 134 67 5.278165 4.293059 69 | 136 68 5.291978 4.249588 70 | 138 69 5.321182 4.379525 71 | 140 70 5.162057 4.488193 72 | 142 71 5.215611 4.429503 73 | 144 72 5.182447 4.419583 74 | 146 73 5.215651 4.434378 75 | 148 74 5.185315 4.625041 76 | 150 75 5.238943 4.572791 77 | 152 76 5.229346 4.587571 78 | 154 77 5.210047 4.755953 79 | 156 78 5.369704 4.813792 80 | 158 79 5.179394 4.885592 81 | 160 80 5.184679 5.527088 82 | 162 81 5.157407 4.947752 83 | 164 82 5.228457 5.040413 84 | 166 83 5.191668 5.164883 85 | 168 84 5.209458 5.050417 86 | 170 85 5.163479 5.117398 87 | 172 86 5.259333 5.067068 88 | 174 87 5.165175 5.465517 89 | 176 88 5.380899 5.157907 90 | 178 89 5.166028 5.228470 91 | 180 90 5.177504 5.233501 92 | 182 91 5.645425 5.386810 93 | 184 92 5.166754 5.425855 94 | 186 93 5.331712 5.554935 95 | 188 94 5.363532 6.123322 96 | 190 95 5.202704 5.889339 97 | 192 96 5.190097 5.744241 98 | 194 97 5.839021 5.891453 99 | 196 98 5.222040 5.869139 100 | 198 99 5.261765 6.054713 101 | 200 100 5.559301 5.782954 102 | -------------------------------------------------------------------------------- /results/2/lsi_rstar.dat: -------------------------------------------------------------------------------- 1 | lsi(R,ITR) ----------------------------- 2 | capacity load query 3 | 4 2 78.645209 8.050979 4 | 6 3 58.939809 6.146489 5 | 8 4 24.369983 1.839268 6 | 10 5 25.711622 1.488292 7 | 12 6 24.891318 1.877841 8 | 14 7 26.968899 1.798507 9 | 16 8 28.311625 1.685857 10 | 18 9 28.719573 1.780531 11 | 20 10 30.521468 1.725827 12 | 22 11 30.586046 2.010383 13 | 24 12 32.701984 2.061094 14 | 26 13 34.361573 1.911659 15 | 28 14 34.792952 1.991330 16 | 30 15 36.244330 2.142095 17 | 32 16 36.903153 2.187676 18 | 34 17 39.462456 2.332167 19 | 36 18 40.903004 2.559452 20 | 38 19 40.924583 2.388966 21 | 40 20 42.183754 2.406313 22 | 42 21 42.123911 2.548881 23 | 44 22 43.140299 2.838472 24 | 46 23 44.510872 2.668744 25 | 48 24 44.654670 2.849298 26 | 50 25 46.089274 2.852391 27 | 52 26 46.098796 2.834808 28 | 54 27 47.185241 2.547076 29 | 56 28 48.361412 2.727525 30 | 58 29 48.655510 2.839835 31 | 60 30 50.625982 2.745447 32 | 62 31 50.077983 2.801424 33 | 64 32 52.362649 2.994459 34 | 66 33 53.250508 2.928381 35 | 68 34 53.945644 3.186703 36 | 70 35 55.752597 3.208328 37 | 72 36 56.036086 3.142568 38 | 74 37 56.465494 3.322786 39 | 76 38 58.254115 3.250626 40 | 78 39 59.082651 3.164381 41 | 80 40 61.748628 3.463880 42 | 82 41 62.467950 3.454855 43 | 84 42 62.682343 3.636014 44 | 86 43 64.413116 3.484216 45 | 88 44 64.204019 3.698943 46 | 90 45 65.642387 3.660521 47 | 92 46 67.047193 3.645432 48 | 94 47 68.303507 3.732044 49 | 96 48 69.578541 3.644820 50 | 98 49 69.697851 3.703842 51 | 100 50 71.203943 4.035256 52 | 102 51 71.286661 4.004061 53 | 104 52 72.586623 4.088270 54 | 106 53 73.509974 4.406644 55 | 108 54 73.892271 4.359301 56 | 110 55 73.682793 4.304344 57 | 112 56 73.976620 4.266493 58 | 114 57 75.167425 4.300608 59 | 116 58 77.270276 4.310879 60 | 118 59 78.921533 4.437240 61 | 120 60 77.980232 4.297079 62 | 122 61 79.016069 4.293973 63 | 124 62 80.575466 4.416789 64 | 126 63 80.775440 5.212809 65 | 128 64 82.522051 5.428139 66 | 130 65 83.595969 5.176717 67 | 132 66 82.903810 5.409198 68 | 134 67 83.389340 5.428713 69 | 136 68 84.833293 5.228800 70 | 138 69 84.850801 5.268611 71 | 140 70 85.808587 5.291562 72 | 142 71 85.127038 5.139959 73 | 144 72 87.094137 5.239003 74 | 146 73 87.933158 5.346702 75 | 148 74 88.382561 5.344664 76 | 150 75 88.616541 5.169183 77 | 152 76 88.678266 5.326802 78 | 154 77 90.285472 5.291009 79 | 156 78 91.436282 5.531050 80 | 158 79 91.732367 5.571095 81 | 160 80 92.191171 5.482741 82 | 162 81 91.826747 5.238839 83 | 164 82 93.225984 5.388719 84 | 166 83 96.321518 5.563612 85 | 168 84 96.635822 5.671636 86 | 170 85 95.955316 5.509879 87 | 172 86 94.666014 5.254569 88 | 174 87 97.141739 5.408813 89 | 176 88 96.626368 5.438063 90 | 178 89 99.300866 5.519688 91 | 180 90 98.825850 5.504021 92 | 182 91 101.0589315.535902 93 | 184 92 101.3986965.608316 94 | 186 93 103.1321715.756129 95 | 188 94 104.0507135.861020 96 | 190 95 103.9823735.961816 97 | 192 96 104.3477845.830336 98 | 194 97 105.0416755.715853 99 | 196 98 107.7598856.041140 100 | 198 99 106.8006585.664412 101 | 200 100 107.3996595.652550 102 | -------------------------------------------------------------------------------- /results/2/lsi_rstar_blk.dat: -------------------------------------------------------------------------------- 1 | lsi(R,BLK) ----------------------------- 2 | capacity load query 3 | 4 2 6.899344 2.457533 4 | 6 3 6.047288 1.761891 5 | 8 4 5.948237 1.550407 6 | 10 5 5.672486 1.586481 7 | 12 6 5.513575 1.551765 8 | 14 7 5.350133 1.682322 9 | 16 8 5.256474 1.571863 10 | 18 9 5.235764 1.683322 11 | 20 10 5.812325 1.631953 12 | 22 11 5.330551 1.693618 13 | 24 12 5.172145 1.731860 14 | 26 13 5.671460 1.753214 15 | 28 14 5.125987 1.855181 16 | 30 15 5.264561 1.893965 17 | 32 16 5.292348 1.920411 18 | 34 17 5.424788 1.957868 19 | 36 18 5.141877 1.963413 20 | 38 19 5.205635 2.039497 21 | 40 20 5.183680 2.108931 22 | 42 21 5.887700 2.174599 23 | 44 22 5.676525 2.196478 24 | 46 23 5.284340 2.265790 25 | 48 24 5.219970 2.340698 26 | 50 25 5.238978 2.177372 27 | 52 26 5.180495 2.467312 28 | 54 27 5.842367 2.540307 29 | 56 28 5.176623 2.513521 30 | 58 29 5.682920 2.528860 31 | 60 30 5.134280 2.730025 32 | 62 31 5.312446 2.771251 33 | 64 32 5.691864 2.665516 34 | 66 33 5.253557 2.755800 35 | 68 34 5.623884 2.767726 36 | 70 35 5.265522 2.746110 37 | 72 36 5.141612 2.833530 38 | 74 37 5.252911 2.866458 39 | 76 38 5.161983 2.870312 40 | 78 39 5.485420 2.943970 41 | 80 40 5.157657 2.925927 42 | 82 41 5.347099 3.026129 43 | 84 42 5.782291 2.933808 44 | 86 43 5.256867 3.102370 45 | 88 44 5.150903 3.100314 46 | 90 45 5.255964 3.140811 47 | 92 46 5.698378 3.236998 48 | 94 47 5.650401 3.313161 49 | 96 48 5.218926 3.390435 50 | 98 49 5.304782 3.277913 51 | 100 50 5.201404 3.479877 52 | 102 51 5.821992 3.436061 53 | 104 52 5.228732 3.580412 54 | 106 53 5.361843 3.567007 55 | 108 54 5.578048 3.677670 56 | 110 55 5.683374 3.687016 57 | 112 56 5.214181 3.718262 58 | 114 57 5.748869 3.747025 59 | 116 58 5.190839 3.822406 60 | 118 59 5.348049 3.835899 61 | 120 60 5.161715 3.942089 62 | 122 61 5.391499 4.089618 63 | 124 62 5.735950 4.214445 64 | 126 63 5.785707 3.868195 65 | 128 64 5.714600 3.966373 66 | 130 65 5.277610 4.132858 67 | 132 66 5.193241 4.204453 68 | 134 67 5.275446 4.294678 69 | 136 68 5.718121 4.222291 70 | 138 69 5.269790 4.354862 71 | 140 70 5.177065 4.455013 72 | 142 71 5.269021 4.407043 73 | 144 72 5.158304 4.450254 74 | 146 73 5.825647 4.420855 75 | 148 74 5.707248 4.571819 76 | 150 75 5.261209 4.554676 77 | 152 76 5.167626 4.564753 78 | 154 77 5.264972 4.683916 79 | 156 78 5.746131 4.788267 80 | 158 79 5.276461 4.883796 81 | 160 80 5.241853 5.537942 82 | 162 81 5.491722 5.005176 83 | 164 82 5.702300 5.062818 84 | 166 83 5.800506 5.133161 85 | 168 84 5.949137 5.068000 86 | 170 85 5.374682 5.131295 87 | 172 86 5.833916 5.255792 88 | 174 87 6.075669 5.485345 89 | 176 88 5.277211 5.452384 90 | 178 89 5.837582 5.230399 91 | 180 90 5.182642 5.279351 92 | 182 91 5.810101 5.388883 93 | 184 92 5.170921 5.436535 94 | 186 93 5.826299 5.493887 95 | 188 94 5.707947 5.705454 96 | 190 95 5.664319 5.849689 97 | 192 96 5.152956 5.695897 98 | 194 97 5.286018 5.832380 99 | 196 98 5.532157 5.969839 100 | 198 99 5.377727 6.358875 101 | 200 100 5.458615 5.720272 102 | -------------------------------------------------------------------------------- /results/plot_results.plt: -------------------------------------------------------------------------------- 1 | #!/gnuplot 2 | ################################################################################ 3 | # Results plotting configuration for spatial_index_benchmark 4 | # https://github.com/mloskot/spatial_index_benchmark 5 | ################################################################################ 6 | # Copyright (C) 2013 Mateusz Loskot 7 | # 8 | # Distributed under the Boost Software License, Version 1.0. 9 | # (See accompanying file LICENSE_1_0.txt or copy at 10 | # http://www.boost.org/LICENSE_1_0.txt) 11 | ################################################################################ 12 | # 13 | #set terminal wxt 14 | set key on left horizontal 15 | set terminal pngcairo size 800,600 font ",10" 16 | outfmt = ".png" 17 | #set terminal svg size 800,600 dynamic font ",10" 18 | #outfmt = ".svg" 19 | libs = "bgi lsi" 20 | algos = "linear quadratic rstar" 21 | 22 | set xlabel "max capacity (min capacity = max * 0.5)" 23 | # 24 | # Plot loading times 25 | # 26 | set ylabel "load 1M objects in seconds" 27 | 28 | set title "Iterative loading using R-tree balancing algorithms vs bulk loading (blk)" 29 | set output "benchmark_rtree_load_itr_vs_blk".outfmt 30 | plot for [l in libs] for [ m in algos." rstar_blk" ] \ 31 | l."_".m.".dat" using 1:3 with lines title l."_".m 32 | 33 | set title "BGI: Iterative loading using R-tree balancing algorithms vs bulk loading (blk)" 34 | set output "benchmark_rtree_load_itr_vs_blk_bgi".outfmt 35 | plot for [l in "bgi"] for [ m in algos." rstar_blk" ] \ 36 | l."_".m.".dat" using 1:3 with lines title l."_".m 37 | 38 | set title "LSI: Iterative loading using R-tree balancing algorithms vs bulk loading (blk)" 39 | set output "benchmark_rtree_load_itr_vs_blk_lsi".outfmt 40 | plot for [l in "lsi"] for [ m in algos." rstar_blk" ] \ 41 | l."_".m.".dat" using 1:3 with lines title l."_".m 42 | 43 | set title "Bulk loading (blk) times not affected by R-tree balancing algorithms" 44 | set output "benchmark_rtree_load_blk_vs_balancing".outfmt 45 | plot for [l in libs] for [m in algos] \ 46 | l."_".m."_blk.dat" using 1:3 with lines title l."_".m."_blk" 47 | 48 | # 49 | # Plot querying times 50 | # 51 | set ylabel "query 100K of 1M objects in seconds" 52 | 53 | set title "Query times for each of R-tree construction methods" 54 | set output "benchmark_rtree_query_itr_vs_blk".outfmt 55 | plot for [l in libs] for [ m in algos." rstar_blk" ] \ 56 | l."_".m.".dat" using 1:4 with lines title l."_".m 57 | 58 | set title "BGI: Query times for each of R-tree construction methods" 59 | set output "benchmark_rtree_query_itr_vs_blk_bgi".outfmt 60 | plot for [l in "bgi"] for [ m in algos." rstar_blk" ] \ 61 | l."_".m.".dat" using 1:4 with lines title l."_".m 62 | 63 | set title "LSI: Query times for each of R-tree construction methods" 64 | set output "benchmark_rtree_query_itr_vs_blk_lsi".outfmt 65 | plot for [l in "lsi"] for [ m in algos." rstar_blk" ] \ 66 | l."_".m.".dat" using 1:4 with lines title l."_".m 67 | 68 | set title "Query times not affected by R-tree bulk loading (blk) vs balancing algorithms" 69 | set output "benchmark_rtree_query_blk_vs_balancing".outfmt 70 | plot for [l in libs] for [ m in algos ] \ 71 | l."_".m."_blk.dat" using 1:4 with lines title l."_".m."_blk" 72 | 73 | #pause -1 74 | # EOF 75 | -------------------------------------------------------------------------------- /run_benchmark.bat: -------------------------------------------------------------------------------- 1 | @echo off 2 | REM ############################################################################ 3 | REM Script running spatial_index_benchmark programs 4 | REM https://github.com/mloskot/spatial_index_benchmark 5 | REM ############################################################################ 6 | REM Copyright (C) 2013 Mateusz Loskot 7 | REM 8 | REM Distributed under the Boost Software License, Version 1.0. 9 | REM (See accompanying file LICENSE_1_0.txt or copy at 10 | REM http://www.boost.org/LICENSE_1_0.txt) 11 | REM ############################################################################ 12 | 13 | IF NOT EXIST "%1" GOTO :NOBUILDDIR 14 | 15 | for /r %%f in (%1\*.exe) do ( 16 | @echo Running %%~nf 17 | %%~ff > %%~nf.dat 18 | ) 19 | GOTO :EOF 20 | 21 | :NOBUILDDIR 22 | @echo Cannot find '%1' build directory -------------------------------------------------------------------------------- /run_benchmark.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | ################################################################################ 3 | # Script running spatial_index_benchmark programs 4 | # https://github.com/mloskot/spatial_index_benchmark 5 | ################################################################################ 6 | # Copyright (C) 2013 Mateusz Loskot 7 | # 8 | # Distributed under the Boost Software License, Version 1.0. 9 | # (See accompanying file LICENSE_1_0.txt or copy at 10 | # http://www.boost.org/LICENSE_1_0.txt) 11 | ################################################################################ 12 | 13 | if [[ ! -d $1 ]]; then 14 | echo "Cannot find '$1' build directory" 15 | exit 1 16 | fi 17 | 18 | RDIR="$PWD" 19 | if [[ -d $2 ]]; then 20 | RDIR="$2" 21 | fi 22 | 23 | BDIR="$1" 24 | LOGEXT="dat" 25 | # 26 | # Benchmark iterative loading (takes long time, skipped on Travis CI) 27 | # 28 | if [[ "$TRAVIS" != "true" ]] ; then 29 | for variant in linear quadratic rstar 30 | do 31 | for benchmark in `find $BDIR -type f -name "*${variant}" -executable | sort` 32 | do 33 | name=`basename ${benchmark}` 34 | echo "$name" 35 | ${benchmark} > ${RDIR}/${name}.${LOGEXT} 36 | done; 37 | done; 38 | fi 39 | 40 | # 41 | # Benchmark bulk loading 42 | # 43 | for variant in linear quadratic rstar 44 | do 45 | for benchmark in `find $BDIR -type f -name "*${variant}_blk" -executable | sort` 46 | do 47 | name=`basename ${benchmark}` 48 | echo "$name" 49 | ${benchmark} > ${RDIR}/${name}.${LOGEXT} 50 | done; 51 | done; 52 | -------------------------------------------------------------------------------- /spatial_index_benchmark.hpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (C) 2013 Mateusz Loskot 3 | // Copyright (c) 2011-2013 Adam Wulkiewicz, Lodz, Poland. 4 | // 5 | // Distributed under the Boost Software License, Version 1.0. 6 | // (See accompanying file LICENSE_1_0.txt or copy 7 | // at http://www.boost.org/LICENSE_1_0.txt) 8 | // 9 | #ifndef MLOSKOT_SPATIAL_INDEX_BENCHMARK_HPP_INCLUDED 10 | #define MLOSKOT_SPATIAL_INDEX_BENCHMARK_HPP_INCLUDED 11 | #ifdef _MSC_VER 12 | #if (_MSC_VER == 1700) 13 | #define _VARIADIC_MAX 6 14 | #endif 15 | #define NOMINMAX 16 | #endif // _MSC_VER 17 | #include 18 | #include 19 | #include 20 | #include 21 | #include 22 | #include 23 | #include 24 | #include 25 | #include 26 | #include 27 | #include 28 | #include 29 | #include 30 | #include 31 | #include 32 | #include 33 | #include 34 | #include "high_resolution_timer.hpp" 35 | 36 | namespace sibench 37 | { 38 | 39 | // 40 | // Default benchmark settings 41 | // 42 | std::size_t const max_iterations = 1000000; 43 | std::size_t const max_capacities = 100; 44 | std::size_t const max_insertions = max_iterations; 45 | std::size_t const max_queries = std::size_t(max_insertions * 0.1); 46 | 47 | enum class rtree_variant { rstar, linear, quadratic }; 48 | 49 | inline std::pair get_rtree_split_variant() 50 | { 51 | #ifdef SIBENCH_RTREE_SPLIT_LINEAR 52 | return std::make_pair(rtree_variant::linear, "L"); 53 | #elif SIBENCH_RTREE_SPLIT_QUADRATIC 54 | return std::make_pair(rtree_variant::quadratic, "Q"); 55 | #elif SIBENCH_RTREE_SPLIT_RSTAR 56 | return std::make_pair(rtree_variant::rstar, "R"); 57 | #else 58 | #error Unknown rtree split algorithm 59 | #endif 60 | } 61 | 62 | inline std::pair get_rtree_load_variant() 63 | { 64 | #ifdef SIBENCH_RTREE_LOAD_ITR 65 | return std::make_pair(rtree_variant::linear, "ITR"); 66 | #elif SIBENCH_RTREE_LOAD_BLK 67 | return std::make_pair(rtree_variant::quadratic, "BLK"); 68 | #else 69 | #error Unknown rtree loading method 70 | #endif 71 | } 72 | 73 | inline std::string get_banner(std::string const& lib) 74 | { 75 | return lib 76 | + "(" 77 | + get_rtree_split_variant().second 78 | + ',' 79 | + get_rtree_load_variant().second 80 | + ")"; 81 | } 82 | 83 | // 84 | // Generators of random objects 85 | // 86 | typedef float coord_t; 87 | typedef std::vector coords_t; 88 | typedef std::tuple point2d_t; 89 | typedef std::vector points2d_t; 90 | typedef std::tuple box2d_t; 91 | typedef std::vector boxes2d_t; 92 | 93 | template 94 | struct random_generator 95 | { 96 | typedef typename std::uniform_real_distribution::result_type result_type; 97 | 98 | T const max; 99 | std::mt19937 gen; 100 | std::uniform_real_distribution dis; 101 | 102 | random_generator(std::size_t n) 103 | : max(static_cast(n / 2)) 104 | , gen(1) // generate the same succession of results for everyone 105 | // (unsigned int)std::chrono::system_clock::now().time_since_epoch().count()) 106 | , dis(-max, max) 107 | {} 108 | 109 | result_type operator()() 110 | { 111 | return dis(gen); 112 | } 113 | 114 | private: 115 | random_generator(random_generator const&) /*= delete*/; 116 | random_generator& operator=(random_generator const&) /*= delete*/; 117 | }; 118 | 119 | inline coords_t generate_coordinates(std::size_t n) 120 | { 121 | random_generator rg(n); 122 | coords_t coords; 123 | coords.reserve(n); 124 | for (decltype(n) i = 0; i < n; ++i) 125 | { 126 | coords.emplace_back(rg()); 127 | } 128 | return std::move(coords); 129 | } 130 | 131 | inline points2d_t generate_points(std::size_t n) 132 | { 133 | auto coords = generate_coordinates(n * 2); 134 | points2d_t points; 135 | points.reserve(n); 136 | auto s = coords.size(); 137 | for (decltype(s) i = 0; i < s; i += 2) 138 | { 139 | points.emplace_back(coords[i], coords[i + 1]); 140 | } 141 | return std::move(points); 142 | } 143 | 144 | inline boxes2d_t generate_boxes(std::size_t n) 145 | { 146 | random_generator rg(n); 147 | 148 | boxes2d_t boxes; 149 | boxes.reserve(n); 150 | for (decltype(n) i = 0; i < n; ++i) 151 | { 152 | auto const x = rg(); 153 | auto const y = rg(); 154 | boxes.emplace_back(x - 0.5f, y - 0.5f, x + 0.5f, y + 0.5f); 155 | } 156 | return std::move(boxes); 157 | } 158 | 159 | 160 | // 161 | // Benchmark running routines 162 | // 163 | struct result_info 164 | { 165 | std::string step; 166 | double min; 167 | double max; 168 | std::size_t min_capacity; 169 | std::size_t max_capacity; 170 | std::size_t iterations; 171 | 172 | result_info(char const* step = "") 173 | : step(step) 174 | , min(-1), max(-1), min_capacity(0), max_capacity(0), iterations(0) 175 | {} 176 | 177 | void accumulate(result_info const& r) 178 | { 179 | min = min < 0 ? r.min : (std::min)(min, r.min); 180 | max = max < 0 ? r.max : (std::max)(max, r.max); 181 | 182 | assert(min <= max); 183 | } 184 | 185 | template 186 | void set_mark(Timer const& t) 187 | { 188 | auto const m = t.elapsed(); 189 | min = min < 0 ? m : (std::min)(m, min); 190 | max = max < 0 ? m : (std::max)(m, max); 191 | 192 | assert(min <= max); 193 | } 194 | }; 195 | 196 | inline std::ostream& operator<<(std::ostream& os, result_info const& r) 197 | { 198 | os << r.step << " " << r.iterations << " in " << r.min << " to " << r.max << " sec" 199 | << std::endl; 200 | return os; 201 | } 202 | 203 | inline std::ostream& print_result(std::ostream& os, std::string const& lib, result_info const& r) 204 | { 205 | os << std::setw(15) << std::setfill(' ') << std::left 206 | << sibench::get_banner(lib) << ": " << r; 207 | return os; 208 | } 209 | 210 | inline std::ostream& print_result(std::ostream& os, std::string const& /*lib*/, result_info const& load, result_info const& query) 211 | { 212 | assert(load.min_capacity == load.min_capacity); 213 | assert(query.max_capacity == query.max_capacity); 214 | 215 | std::streamsize wn(5), wf(10); 216 | os << std::left << std::setfill(' ') << std::fixed << std::setprecision(6) 217 | << std::setw(wn) << load.max_capacity 218 | << std::setw(wn) << load.min_capacity 219 | << std::setw(wf) << load.min 220 | << std::setw(wf) << query.min 221 | << std::endl; 222 | return os; 223 | } 224 | 225 | inline std::ostream& print_result_header(std::ostream& os, std::string const& lib) 226 | { 227 | std::streamsize const wn(5), wf(10), vn(2); 228 | os << sibench::get_banner(lib) << ' ' << std::setw(wn * vn + wf * vn) << std::setfill('-') << ' ' << std::endl; 229 | os << std::left << std::setfill(' ') 230 | << std::setw(wn * vn) << "capacity" << std::setw(wf) << "load" << std::setw(wf) << "query" 231 | << std::endl; 232 | return os; 233 | } 234 | 235 | #if 0 236 | // min and max 237 | inline std::ostream& print_result(std::ostream& os, std::string const& /*lib*/, result_info const& load, result_info const& query) 238 | { 239 | assert(load.min_capacity == load.min_capacity); 240 | assert(query.max_capacity == query.max_capacity); 241 | 242 | std::streamsize wn(5), wf(10); 243 | os << std::left << std::setfill(' ') << std::fixed << std::setprecision(6) 244 | << std::setw(wn) << load.max_capacity 245 | << std::setw(wn) << load.min_capacity 246 | << std::setw(wf) << load.min 247 | << std::setw(wf) << load.max 248 | << std::setw(wf) << query.min 249 | << std::setw(wf) << query.max 250 | << std::endl; 251 | return os; 252 | } 253 | inline std::ostream& print_result_header(std::ostream& os, std::string const& lib) 254 | { 255 | std::streamsize const wn(5), wf(10), vn(2); 256 | os << sibench::get_banner(lib) << ' ' << std::setw(wn * vn + wf * vn * vn) << std::setfill('-') << ' ' << std::endl; 257 | os << std::left << std::setfill(' ') 258 | << std::setw(wn * vn) << "capacity" << std::setw(wf * vn) << "load (s)" << std::setw(wf * vn) << "query (s)" 259 | << std::endl; 260 | os << std::left << std::setfill(' ') 261 | << std::setw(wn) << "max" << std::setw(wn) << "min" 262 | << std::setw(wf) << "min" << std::setw(wf) << "max" 263 | << std::setw(wf) << "min" << std::setw(wf) << "max" 264 | << std::endl; 265 | return os; 266 | } 267 | #endif 268 | 269 | inline std::ostream& print_query_count(std::ostream& os, std::string const& lib, size_t i) 270 | { 271 | os << sibench::get_banner(lib) << " stats: found=" << i << std::endl; 272 | return os; 273 | } 274 | 275 | template 276 | inline result_info benchmark(char const* step, std::size_t iterations, 277 | Container const& objects, Operation op) 278 | { 279 | result_info r(step); 280 | r.iterations = iterations; 281 | { 282 | util::high_resolution_timer t; 283 | op(objects, iterations); 284 | r.set_mark(t); 285 | } 286 | return std::move(r); 287 | } 288 | 289 | } // namespace sibench 290 | 291 | #endif 292 | --------------------------------------------------------------------------------