#include "./fast_io/include/fast_io.h" #include "./fast_io/include/fast_io_device.h" #include "na_nbt_impl.hpp" #include int main(int argc, char** argv) { { fast_io::native_file_loader nfl(fast_io::mnp::os_c_str(argv[1])); std::system("pause"); { std::vector data{ reinterpret_cast(nfl.begin()), reinterpret_cast(nfl.end())}; fast_io::io::println(fast_io::out(), "test big_endian read in_place with bound_check"); using na::nbt::nbt_type; std::system("pause"); auto beforetime = std::chrono::steady_clock::now(); auto document{na::nbt::read(std::span(data))}; auto aftertime = std::chrono::steady_clock::now(); std::system("pause"); double duration_second = std::chrono::duration(aftertime - beforetime).count(); auto root = document.value(); fast_io::io::println(fast_io::out(), duration_second, "s"); fast_io::io::println(fast_io::out(), "size@ ", nfl.size(), "bytes"); fast_io::io::println(fast_io::out(), "speed@ ", nfl.size() / 1000.0 / 1000.0 / duration_second, "mb/s"); fast_io::io::println(fast_io::out(), ""); } std::system("pause"); } }