From 1b696122468618d8e60a82a9bf49015110903b1a Mon Sep 17 00:00:00 2001 From: John Keiser Date: Mon, 10 Aug 2020 14:07:32 -0700 Subject: [PATCH] Remove information about nonexistent computed gotos :) --- .circleci/config.yml | 6 ------ doc/performance.md | 13 ------------- include/simdjson/portability.h | 1 - src/generic/dom_parser_implementation.h | 6 ------ 4 files changed, 26 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 17ed2896..cc654a6b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -197,11 +197,6 @@ jobs: executor: gcc10 environment: { CXXFLAGS: -march=nehalem } steps: [ cmake_test ] - no-computed-goto-gcc10: - description: Build, run tests and check performance on GCC 7 with -DSIMDJSON_NO_COMPUTED_GOTO=true - executor: gcc10 - environment: { CXXFLAGS: -DSIMDJSON_NO_COMPUTED_GOTO=true } - steps: [ cmake_test ] workflows: version: 2.1 @@ -231,7 +226,6 @@ workflows: # quicker make single-implementation tests - arch-haswell-gcc10 - arch-nehalem-gcc10 - - no-computed-goto-gcc10 # testing "just the library" - justlib-gcc10 diff --git a/doc/performance.md b/doc/performance.md index 2b82d82a..67a28013 100644 --- a/doc/performance.md +++ b/doc/performance.md @@ -8,7 +8,6 @@ are still some scenarios where tuning can enhance performance. * [Keeping documents around for longer](#keeping-documents-around-for-longer) * [Server Loops: Long-Running Processes and Memory Capacity](#server-loops-long-running-processes-and-memory-capacity) * [Large files and huge page support](#large-files-and-huge-page-support) -* [Computed GOTOs](#computed-gotos) * [Number parsing](#number-parsing) * [Visual Studio](#visual-studio) * [Downclocking](#downclocking) @@ -122,18 +121,6 @@ use the `-H` flag to omit the memory allocation cost from the benchmark results. ./parse -H largefile # without memory allocation ``` -Computed GOTOs --------------- - -For best performance, we use a technique called "computed goto" when the compiler supports it, it is -also sometimes described as "Labels as Values". Though it is not part of the C++ standard, it is -supported by many major compilers and it brings measurable performance benefits that are difficult -to achieve otherwise. The computed gotos are automatically disabled under Visual Studio. - -If you wish to forcefully disable computed gotos, you can do so by compiling the code with -`-DSIMDJSON_NO_COMPUTED_GOTO=1`. It is not recommended to disable computed gotos if your compiler -supports it. In fact, you should almost never need to be concerned with computed gotos. - Number parsing -------------- diff --git a/include/simdjson/portability.h b/include/simdjson/portability.h index 58fc275d..8f9f1842 100644 --- a/include/simdjson/portability.h +++ b/include/simdjson/portability.h @@ -21,7 +21,6 @@ * Under clang for Windows, we enable: * * target pragmas so that part and only part of the * code gets compiled for advanced instructions. - * * computed gotos. * */ #ifdef __clang__ diff --git a/src/generic/dom_parser_implementation.h b/src/generic/dom_parser_implementation.h index 1e01ac92..49dd86f8 100644 --- a/src/generic/dom_parser_implementation.h +++ b/src/generic/dom_parser_implementation.h @@ -10,12 +10,6 @@ struct scope_descriptor { uint32_t count; // how many elements in the scope }; // struct scope_descriptor -#ifdef SIMDJSON_USE_COMPUTED_GOTO -typedef void* ret_address_t; -#else -typedef char ret_address_t; -#endif - class dom_parser_implementation final : public internal::dom_parser_implementation { public: /** Tape location of each open { or [ */