Sha256: 57996673ffd2020eeb701f07c1900c3b3578918d33a0e4f87b47b7ea9eb59471
Contents?: true
Size: 799 Bytes
Versions: 16
Compression:
Stored size: 799 Bytes
Contents
// Copyright (c) 2018-2020 Dr. Colin Hirsch and Daniel Frey // Please see LICENSE for license or visit https://github.com/taocpp/json/ #include <tao/json.hpp> #include <tao/json/external/pegtl/contrib/json.hpp> #include "bench_mark.hpp" namespace pegtl = tao::json::pegtl; // clang-format off int main( int argc, char** argv ) { for( int i = 1; i < argc; ++i ) { const auto r = tao::bench::mark( "pegtl", argv[ i ], [&]() { pegtl::file_input< pegtl::tracking_mode::lazy > in( argv[ i ] ); pegtl::parse< pegtl::must< pegtl::json::text, pegtl::eof > >( in ); } ); tao::bench::mark( "json", argv[ i ], [&]() { tao::json::events::discard consumer; tao::json::events::from_file( consumer, argv[ i ] ); }, r ); } return 0; }
Version data entries
16 entries across 16 versions & 1 rubygems