text stringlengths 24 1.04M | metadata stringlengths 233 497 |
|---|---|
### File: benchmark/0002.file_io_tsc/time/iobuf_file_std_format.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
#include<format>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"output");
fast_io... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0002.file_io_tsc/time/iobuf_file_std_format.cc", "license": "mit", "size": 381} |
### File: benchmark/0002.file_io_tsc/time/iobuf_file_std_format_locale.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
#include<format>
#include<locale>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
{
std::locale l... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0002.file_io_tsc/time/iobuf_file_std_format_locale.cc", "license": "mit", "size": 432} |
### File: benchmark/0002.file_io_tsc/time/iobuf_file_unsafe_rt_fprint.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
constexpr fast_io::unsafe_rt_format_string_view view("{}\n",3);
{
f... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0002.file_io_tsc/time/iobuf_file_unsafe_rt_fprint.cc", "license": "mit", "size": 587} |
### File: benchmark/0002.file_io_tsc/time/iobuf_file_unsafe_rt_fprint_l10n.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_i18n.h>
#include<fast_io_driver/timer.h>
int main()
{
constexpr std::size_t N(10000000);
fast_io::native_l10n loc("");
constexpr fast_io::unsafe_rt_format_string_view view("... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0002.file_io_tsc/time/iobuf_file_unsafe_rt_fprint_l10n.cc", "license": "mit", "size": 432} |
### File: benchmark/0002.file_io_tsc/time/llvm_raw_fd_ostream.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/llvm.h>
#include<fast_io_driver/timer.h>
#include<vector>
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"output");
fast_io::llvm::raw_fd_ostream_file fsof(... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0002.file_io_tsc/time/llvm_raw_fd_ostream.cc", "license": "mit", "size": 389} |
### File: benchmark/0002.file_io_tsc/time/stdio.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"output");
fast_io::c_file obf(u8"stdio.txt",fast_io::open_mode::out);
for(std::size_t i{};i!=N;... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0002.file_io_tsc/time/stdio.cc", "license": "mit", "size": 507} |
### File: benchmark/0002.file_io_tsc/time/u32iobuf_file.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"output");
fast_io::u32obuf_file obf(u8"u32iobuf_file.txt");... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0002.file_io_tsc/time/u32iobuf_file.cc", "license": "mit", "size": 521} |
### File: benchmark/0002.file_io_tsc/time/wiobuf_file.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"output");
fast_io::wobuf_file obf(u8"wiobuf_file.txt");
for(... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0002.file_io_tsc/time/wiobuf_file.cc", "license": "mit", "size": 513} |
### File: benchmark/0003.file_io_hex/fstream.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_legacy.h>
#include<fast_io_driver/timer.h>
#include<vector>
#include<iomanip>
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"output");
fast_io::filebuf_file obf(u8"fstream.txt",fa... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0003.file_io_hex/fstream.cc", "license": "mit", "size": 623} |
### File: benchmark/0003.file_io_hex/fstream_locale.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_legacy.h>
#include<fast_io_driver/timer.h>
#include<vector>
#include<iomanip>
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"output");
fast_io::filebuf_file obf(u8"fstream_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0003.file_io_hex/fstream_locale.cc", "license": "mit", "size": 433} |
### File: benchmark/0003.file_io_hex/iobuf_file.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"output");
fast_io::obuf_file obf(u8"iobuf_file.txt");
for(std::siz... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0003.file_io_hex/iobuf_file.cc", "license": "mit", "size": 520} |
### File: benchmark/0003.file_io_hex/iobuf_file_addrvw.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"output");
fast_io::obuf_file obf(u8"iobuf_file_addrvw.txt");... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0003.file_io_hex/iobuf_file_addrvw.cc", "license": "mit", "size": 540} |
### File: benchmark/0003.file_io_hex/iobuf_file_l10n.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_i18n.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"output");
fast_io::obuf_file obf("iob... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0003.file_io_hex/iobuf_file_l10n.cc", "license": "mit", "size": 401} |
### File: benchmark/0004.file_io_floating/charconv_general.cc
#include<fast_io.h>
#include<random>
#include<cfloat>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<charconv>
int main()
{
constexpr std::size_t N{10000000};
std::mt19937_64 eng{};
std::uniform_real_distribution<double> dis(DBL_MI... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0004.file_io_floating/charconv_general.cc", "license": "mit", "size": 690} |
### File: benchmark/0004.file_io_floating/charconv_general_float.cc
#include<fast_io.h>
#include<random>
#include<cfloat>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<charconv>
int main()
{
constexpr std::size_t N{10000000};
std::mt19937_64 eng{};
std::uniform_real_distribution<float> dis(F... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0004.file_io_floating/charconv_general_float.cc", "license": "mit", "size": 700} |
### File: benchmark/0004.file_io_floating/charconv_hexfloat.cc
#include<fast_io.h>
#include<random>
#include<cfloat>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<charconv>
int main()
{
constexpr std::size_t N{10000000};
std::mt19937_64 eng{};
std::uniform_real_distribution<double> dis(DBL_M... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0004.file_io_floating/charconv_hexfloat.cc", "license": "mit", "size": 688} |
### File: benchmark/0004.file_io_floating/charconv_hexfloat_float.cc
#include<fast_io.h>
#include<random>
#include<cfloat>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<charconv>
int main()
{
constexpr std::size_t N{10000000};
std::mt19937_64 eng{};
std::uniform_real_distribution<float> dis(... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0004.file_io_floating/charconv_hexfloat_float.cc", "license": "mit", "size": 685} |
### File: benchmark/0004.file_io_floating/decimal.cc
#include<fast_io.h>
#include<random>
#include<cfloat>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N{10000000};
std::mt19937_64 eng{};
std::uniform_real_distribution<double> dis(DBL_M... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0004.file_io_floating/decimal.cc", "license": "mit", "size": 527} |
### File: benchmark/0004.file_io_floating/decimal_float.cc
#include<fast_io.h>
#include<random>
#include<cfloat>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N{10000000};
std::mt19937_64 eng{};
std::uniform_real_distribution<float> dis(... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0004.file_io_floating/decimal_float.cc", "license": "mit", "size": 545} |
### File: benchmark/0004.file_io_floating/decimal_l10n.cc
#include<fast_io.h>
#include<random>
#include<cfloat>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<fast_io_i18n.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N{10000000};
std::mt19937_64 eng{};
std::uniform_real_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0004.file_io_floating/decimal_l10n.cc", "license": "mit", "size": 606} |
### File: benchmark/0004.file_io_floating/general.cc
#include<fast_io.h>
#include<random>
#include<cfloat>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N{10000000};
std::mt19937_64 eng{};
std::uniform_real_distribution<double> dis(DBL_M... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0004.file_io_floating/general.cc", "license": "mit", "size": 550} |
### File: benchmark/0004.file_io_floating/general_float.cc
#include<fast_io.h>
#include<random>
#include<cfloat>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N{10000000};
std::mt19937_64 eng{};
std::uniform_real_distribution<float> dis(... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0004.file_io_floating/general_float.cc", "license": "mit", "size": 568} |
### File: benchmark/0004.file_io_floating/general_l10n.cc
#include<fast_io.h>
#include<random>
#include<cfloat>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<fast_io_i18n.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N{10000000};
std::mt19937_64 eng{};
std::uniform_real_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0004.file_io_floating/general_l10n.cc", "license": "mit", "size": 629} |
### File: benchmark/0004.file_io_floating/hexfloat.cc
#include<fast_io.h>
#include<random>
#include<cfloat>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N{10000000};
std::mt19937_64 eng{};
std::uniform_real_distribution<double> dis(DBL_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0004.file_io_floating/hexfloat.cc", "license": "mit", "size": 551} |
### File: benchmark/0004.file_io_floating/hexfloat_float.cc
#include<fast_io.h>
#include<random>
#include<cfloat>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N{10000000};
std::mt19937_64 eng{};
std::uniform_real_distribution<float> dis... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0004.file_io_floating/hexfloat_float.cc", "license": "mit", "size": 562} |
### File: benchmark/0005.time/fast_io.cc
#include<fast_io_device.h>
#include<fast_io.h>
#include<fast_io_driver/timer.h>
#include<fast_io_i18n.h>
using namespace fast_io::io;
int main()
{
fast_io::native_l10n l10n("");
constexpr std::size_t N(10000000);
auto iso8601_ts{utc(fast_io::posix_clock_gettime(fast_io::pos... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0005.time/fast_io.cc", "license": "mit", "size": 492} |
### File: benchmark/0005.time/glibc_nl_langinfo.cc
#include<clocale>
#include<langinfo.h>
#include<fast_io_device.h>
#include<fast_io.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
auto glibc_locale{newlocale(LC_ALL,"",locale_t(0))};
constexpr std::size_t buffer_size{10000};
char buf... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0005.time/glibc_nl_langinfo.cc", "license": "mit", "size": 811} |
### File: benchmark/0005.time/iso8601.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
auto iso8601_ts{utc(fast_io::posix_clock_gettime(fast_io::posix_clock_id::realtime))};
{
fast_io::timer timer(u8"fa... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0005.time/iso8601.cc", "license": "mit", "size": 400} |
### File: benchmark/0005.time/put_time.cc
#include<clocale>
#include<langinfo.h>
#include<fast_io.h>
#include<fast_io_driver/timer.h>
#include<fast_io_legacy.h>
#include<locale>
#include<iomanip>
using namespace fast_io::io;
int main()
{
auto glibc_locale{newlocale(LC_ALL,"",locale_t(0))};
constexpr std::size_t buf... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0005.time/put_time.cc", "license": "mit", "size": 865} |
### File: benchmark/0006.random/password/ibuf_white_hole_engine.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<random>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
fast_io::timer tm(u8"ibuf_white_hole_engine");
fast_io::u8obuf_file obf(u"ibuf_white_hole_engine.txt");
fast_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0006.random/password/ibuf_white_hole_engine.cc", "license": "mit", "size": 695} |
### File: benchmark/0006.random/password/mt19937_64.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<random>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
fast_io::timer tm(u8"mt19937_64");
fast_io::u8obuf_file obf(u8"mt19937_64.txt");
std::mt19937_64 eng;//just use this as a... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0006.random/password/mt19937_64.cc", "license": "mit", "size": 712} |
### File: benchmark/0006.random/password/random_device.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<random>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
fast_io::timer tm(u8"random_device");
fast_io::u8obuf_file obf(u"random_device.txt");
std::random_device eng;
std::un... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0006.random/password/random_device.cc", "license": "mit", "size": 664} |
### File: benchmark/0007.concat/concat_cstring.cc
#include<atlstr.h>
#include<fast_io_driver/mfc.h>
#include<fast_io.h>
#include<fast_io_driver/timer.h>
#include<fast_io_device.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"concat_cstring");
fast_io::obuf_fil... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0007.concat/concat_cstring.cc", "license": "mit", "size": 384} |
### File: benchmark/0007.concat/concat_hstring.cc
#include<winrt/base.h>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"concat_hstring");
fast_io::obuf_file obf(u"concat_hstring.txt"... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0007.concat/concat_hstring.cc", "license": "mit", "size": 361} |
### File: benchmark/0007.concat/concat_qstring.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/qt.h>
#include<vector>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"concat_qstring");
fast_io::obuf_file o... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0007.concat/concat_qstring.cc", "license": "mit", "size": 383} |
### File: benchmark/0007.concat/concat_string.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"concat_string");
fast_io::obuf_file obf("concat_string.txt");
for(st... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0007.concat/concat_string.cc", "license": "mit", "size": 337} |
### File: benchmark/0007.concat/concat_vs_format.cc
#include<string>
#include<fast_io.h>
#include<version>
#if __has_include(<format>) && !defined(DISABLE_STD_FORMAT_BENCH)
#include<format>
#endif
#if __has_include(<fmt/core.h>) && defined(ENABLE_FMT_BENCH)
#include <fmt/core.h>
#if __has_include(<fmt/compile.h>)
#incl... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0007.concat/concat_vs_format.cc", "license": "mit", "size": 3289} |
### File: benchmark/0007.concat/to_hstring.cc
#include<winrt/base.h>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(10000000);
{
fast_io::timer t(u8"concat_hstring");
fast_io::obuf_file obf(u"concat_hstring.txt");
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0007.concat/to_hstring.cc", "license": "mit", "size": 441} |
### File: benchmark/0008/CMakeLists.txt
cmake_minimum_required(VERSION 3.22)
project(example CXX)
include(FetchContent)
FetchContent_Declare(
dragonbox
GIT_REPOSITORY https://github.com/jk-jeon/dragonbox
)
FetchContent_MakeAvailable(dragonbox)
add_executable(
comparison
comparison.cpp
)
ta... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "CMake", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0008/CMakeLists.txt", "license": "mit", "size": 455} |
### File: benchmark/0008/comparison.cpp
#include <fast_io.h>
#include <fast_io_device.h>
#include <fast_io_driver/timer.h>
#include <charconv>
#include <iostream>
#include <fstream>
#include <vector>
#include <random>
#include <cfloat>
#include "dragonbox/dragonbox_to_chars.h"
// both fast_io::pr_rsv_size<char, ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0008/comparison.cpp", "license": "mit", "size": 2859} |
### File: benchmark/0008/seperate/charconv.cc
#include <fast_io.h>
#include <fast_io_device.h>
#include <fast_io_driver/timer.h>
#include <charconv>
#include <random>
#include <vector>
#include <cfloat>
using namespace fast_io::io;
constexpr int buf_size = 25;
inline void charconv_fast_io(const std::vector<double>& ... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0008/seperate/charconv.cc", "license": "mit", "size": 890} |
### File: benchmark/0008/seperate/charconv_no_c_str.cc
#include <fast_io.h>
#include <fast_io_device.h>
#include <fast_io_driver/timer.h>
#include <charconv>
#include <random>
#include <vector>
#include <cfloat>
constexpr int buf_size = 25;
inline void charconv_fast_io(const std::vector<double>& vec)
{
fast_io::... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0008/seperate/charconv_no_c_str.cc", "license": "mit", "size": 878} |
### File: benchmark/0008/seperate/dragonbox.cc
#include <fast_io.h>
#include <fast_io_device.h>
#include <fast_io_driver/timer.h>
#include "dragonbox/dragonbox_to_chars.h"
#include <random>
#include <vector>
#include <cfloat>
using namespace fast_io::io;
constexpr int buf_size = 25;
inline void dragonbox_fast_io(con... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0008/seperate/dragonbox.cc", "license": "mit", "size": 879} |
### File: benchmark/0008/seperate/dragonbox_no_c_str.cc
#include <fast_io.h>
#include <fast_io_device.h>
#include <fast_io_driver/timer.h>
#include "dragonbox/dragonbox_to_chars.h"
#include <random>
#include <vector>
#include <cfloat>
constexpr int buf_size = 25;
inline void dragonbox_fast_io(const std::vector<doubl... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0008/seperate/dragonbox_no_c_str.cc", "license": "mit", "size": 863} |
### File: benchmark/0008/seperate/fast_io.cc
#include <fast_io.h>
#include <fast_io_device.h>
#include <fast_io_driver/timer.h>
#include <random>
#include <vector>
#include <cfloat>
using namespace fast_io::io;
constexpr int buf_size = 25;
inline void fast_io_fast_io(const std::vector<double>& vec)
{
fast_io::ti... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0008/seperate/fast_io.cc", "license": "mit", "size": 858} |
### File: benchmark/0008/seperate/fast_io_direct.cc
#include <fast_io.h>
#include <fast_io_device.h>
#include <fast_io_driver/timer.h>
#include <random>
#include <vector>
#include <cfloat>
using namespace fast_io::io;
[[maybe_unused]] constexpr int buf_size = 25;
inline void fast_io_fast_io(const std::vector<double>... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0008/seperate/fast_io_direct.cc", "license": "mit", "size": 785} |
### File: benchmark/0008/seperate/fast_io_no_c_str.cc
#include <fast_io.h>
#include <fast_io_device.h>
#include <fast_io_driver/timer.h>
#include <random>
#include <vector>
#include <cfloat>
constexpr int buf_size = 25;
inline void fast_io_fast_io(const std::vector<double>& vec)
{
fast_io::timer t(u8"fast_io2");... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0008/seperate/fast_io_no_c_str.cc", "license": "mit", "size": 842} |
### File: benchmark/0008/seperate_short/charconv_no_c_str.cc
#include <fast_io.h>
#include <fast_io_device.h>
#include <fast_io_driver/timer.h>
#include <charconv>
#include <random>
#include <vector>
#include <cfloat>
constexpr int buf_size = 25;
inline void charconv_fast_io(const std::vector<double>& vec)
{
fas... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0008/seperate_short/charconv_no_c_str.cc", "license": "mit", "size": 877} |
### File: benchmark/0008/seperate_short/dragonbox_no_c_str.cc
#include <fast_io.h>
#include <fast_io_device.h>
#include <fast_io_driver/timer.h>
#include "dragonbox/dragonbox_to_chars.h"
#include <random>
#include <vector>
#include <cfloat>
constexpr int buf_size = 25;
inline void dragonbox_fast_io(const std::vector... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0008/seperate_short/dragonbox_no_c_str.cc", "license": "mit", "size": 862} |
### File: benchmark/0008/seperate_short/fast_io_no_c_str.cc
#include <fast_io.h>
#include <fast_io_device.h>
#include <fast_io_driver/timer.h>
#include <random>
#include <vector>
#include <cfloat>
constexpr int buf_size = 25;
inline void fast_io_fast_io(const std::vector<double>& vec)
{
fast_io::timer t(u8"fast_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0008/seperate_short/fast_io_no_c_str.cc", "license": "mit", "size": 841} |
### File: benchmark/0009.concatstring/concat.cc
#include<string>
#include<fast_io.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
int test_i{};
std::string test_s{"hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello"};
std::string re{};
auto t0{fast_io::p... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0009.concatstring/concat.cc", "license": "mit", "size": 513} |
### File: benchmark/0009.concatstring/format.cc
#include<string>
#include<fast_io.h>
#include<fast_io_driver/timer.h>
#include<format>
using namespace fast_io::io;
int main()
{
int test_i{};
std::string test_s{"hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello"};
std::string re{};
a... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0009.concatstring/format.cc", "license": "mit", "size": 530} |
### File: benchmark/0009.concatstring/stringstream.cc
#include<string>
#include<fast_io.h>
#include<fast_io_driver/timer.h>
#include<sstream>
using namespace fast_io::io;
int main()
{
int test_i{};
std::string test_s{"hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello"};
std::string r... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0009.concatstring/stringstream.cc", "license": "mit", "size": 570} |
### File: benchmark/0009.concatstring/tostring.cc
#include<string>
#include<fast_io.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
int test_i{};
std::string test_s{"hellohellohellohellohellohellohellohellohellohellohellohellohellohellohellohello"};
std::string re{};
auto t0{fast_io:... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0009.concatstring/tostring.cc", "license": "mit", "size": 514} |
### File: benchmark/0010.line/contiguous_line_scanner.cc
#include<string_view>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
std::size_t lines{};
{
fast_io::timer t(u8"input");
fast_io::native_file_loader loader(u8"ibuf... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0010.line/contiguous_line_scanner.cc", "license": "mit", "size": 409} |
### File: benchmark/0010.line/getline.cc
#include<string>
#include<fast_io_legacy.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
std::size_t lines{};
{
fast_io::timer t(u8"input");
fast_io::filebuf_file fbf(u8"ibuf_white_hole_engine.txt",fast_io::open_mode::in);
std::istream fin... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0010.line/getline.cc", "license": "mit", "size": 369} |
### File: benchmark/0010.line/line_get.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
std::size_t lines{};
{
fast_io::timer t(u8"input");
fast_io::u8ibuf_file ibf(u8"ibuf_white_hole_engine.txt");
fo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0010.line/line_get.cc", "license": "mit", "size": 388} |
### File: benchmark/0010.line/line_get_fbf.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_legacy.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
std::size_t lines{};
{
fast_io::timer t(u8"input");
//use std::filebuf_file to prov... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0010.line/line_get_fbf.cc", "license": "mit", "size": 517} |
### File: benchmark/0010.line/line_scanner.cc
#include<string_view>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
std::size_t lines{};
{
fast_io::timer t(u8"input");
fast_io::u8ibuf_file ibf(u8"ibuf_white_hole_engine.tx... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0010.line/line_scanner.cc", "license": "mit", "size": 360} |
### File: benchmark/0010.line/random_data.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<random>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main(int argc, char** argv)
{
std::size_t n{100000};
if(1<argc)
{
n=fast_io::to<std::size_t>(fast_io::mnp::os_c_str(argv[1]));
}
fast_io... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0010.line/random_data.cc", "license": "mit", "size": 821} |
### File: benchmark/0010.line/scan_qstring.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<fast_io_driver/qt.h>
using namespace fast_io::io;
int main()
{
std::size_t spaces{};
{
fast_io::timer t(u8"input");
fast_io::u8ibuf_file ibf(u8"ibuf_white_hole_engine.txt");
fo... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0010.line/scan_qstring.cc", "license": "mit", "size": 377} |
### File: benchmark/0010.line/scan_qstring_u16utf8.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<fast_io_driver/qt.h>
using namespace fast_io::io;
int main()
{
std::size_t spaces{};
{
fast_io::timer t(u8"input");
fast_io::u16iutf8_file ibf(u8"ibuf_white_hole_engine.t... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0010.line/scan_qstring_u16utf8.cc", "license": "mit", "size": 379} |
### File: benchmark/0010.line/scan_strlike.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
std::size_t spaces{};
{
fast_io::timer t(u8"input");
fast_io::u8ibuf_file ibf(u8"ibuf_white_hole_engine.txt");
for(std::u8stri... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0010.line/scan_strlike.cc", "license": "mit", "size": 368} |
### File: benchmark/0010.line/scan_u16string_u16utf8.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
std::size_t spaces{};
{
fast_io::timer t(u8"input");
fast_io::u16iutf8_file ibf(u8"ibuf_white_hole_engine.txt");
for... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0010.line/scan_u16string_u16utf8.cc", "license": "mit", "size": 377} |
### File: benchmark/0010.line/scan_winrt_hstring.cc
#include<winrt/base.h>
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
std::size_t spaces{};
{
fast_io::timer t(u8"input");
fast_io::u8ibuf_file ibf(u8"... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0010.line/scan_winrt_hstring.cc", "license": "mit", "size": 414} |
### File: benchmark/0011.containers/vector/0000.initialization/fast_io.cc
#include<fast_io.h>
#include<fast_io_driver/timer.h>
#include<fast_io_dsal/vector.h>
int main()
{
fast_io::timer t(u8"fast_io::vector");
fast_io::vector<std::size_t> vec(100000000);
} | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0011.containers/vector/0000.initialization/fast_io.cc", "license": "mit", "size": 189} |
### File: benchmark/0011.containers/vector/0000.initialization/std.cc
#include<fast_io.h>
#include<fast_io_driver/timer.h>
#include<vector>
int main()
{
fast_io::timer t(u8"std::vector");
std::vector<std::size_t> vec(100000000);
} | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0011.containers/vector/0000.initialization/std.cc", "license": "mit", "size": 166} |
### File: benchmark/0011.containers/vector/0001.push_back/fast_io.cc
#include<fast_io.h>
#include<fast_io_driver/timer.h>
#include<fast_io_dsal/vector.h>
int main()
{
fast_io::timer tm(u8"fast_io::vector::push_back");
fast_io::vector<std::size_t> vec;
constexpr std::size_t n{100000000};
vec.reserve(n);
for(std::... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0011.containers/vector/0001.push_back/fast_io.cc", "license": "mit", "size": 304} |
### File: benchmark/0011.containers/vector/0001.push_back/fast_io_unchecked.cc
#include<fast_io.h>
#include<fast_io_driver/timer.h>
#include<fast_io_dsal/vector.h>
int main()
{
fast_io::timer tm(u8"fast_io::vector::push_back_unchecked");
fast_io::vector<std::size_t> vec;
constexpr std::size_t n{100000000};
vec.re... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0011.containers/vector/0001.push_back/fast_io_unchecked.cc", "license": "mit", "size": 321} |
### File: benchmark/0011.containers/vector/0001.push_back/std.cc
#include<fast_io.h>
#include<fast_io_driver/timer.h>
#include<vector>
int main()
{
fast_io::timer tm(u8"std::vector::push_back");
std::vector<std::size_t> vec;
constexpr std::size_t n{100000000};
vec.reserve(n);
for(std::size_t i{};i!=n;++i)
{
v... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0011.containers/vector/0001.push_back/std.cc", "license": "mit", "size": 278} |
### File: benchmark/0011.containers/vector/0002.multi_push_back/fast_io.cc
#include<fast_io_dsal/vector.h>
namespace test
{
template<typename T>
using vector = ::fast_io::vector<T>;
}
/*
Unfortunately fast_io internally sometimes uses vector despite i try to avoid them. Well then better expose the APIs
*/
#define BENC... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0011.containers/vector/0002.multi_push_back/fast_io.cc", "license": "mit", "size": 311} |
### File: benchmark/0011.containers/vector/0002.multi_push_back/main.h
#include<fast_io.h>
#include<fast_io_driver/timer.h>
int main()
{
fast_io::timer t(BENCH_VECTOR_COMMENT_STRING);
for(std::size_t j{};j!=100000;++j)
{
test::vector<std::int_least32_t> vec1;
test::vector<char32_t> vec2;
test::vector<double> ve... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0011.containers/vector/0002.multi_push_back/main.h", "license": "mit", "size": 1442} |
### File: benchmark/0011.containers/vector/0002.multi_push_back/std.cc
#include<vector>
#include<cstdint>
namespace test
{
template<typename T>
using vector = ::std::vector<T>;
}
#define BENCH_VECTOR_COMMENT_STRING u8"std::vector<T>"
#include"main.h" | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0011.containers/vector/0002.multi_push_back/std.cc", "license": "mit", "size": 182} |
### File: benchmark/0011.containers/vector/0002.multi_push_back/std_mimalloc.cc
#include<vector>
#include<cstdint>
#include<mimalloc-2.0/mimalloc.h>
namespace test
{
template<typename T>
using vector = ::std::vector<T,mi_stl_allocator<T>>;
}
#define BENCH_VECTOR_COMMENT_STRING u8"std::vector<T,mi_stl_allocator<T>>"
#i... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0011.containers/vector/0002.multi_push_back/std_mimalloc.cc", "license": "mit", "size": 257} |
### File: benchmark/0012.isa/around_asm.s
movq 8(%rsp),%r13
movq 112(%rsp),%r15
movq %r13,%r12
rorq $7,%r13
addq %r14,%rax
movq %r15,%r14
rorq $42,%r15
xorq %r12,%r13
shrq $7,%r12
rorq $1,%r13
xorq %r14,%r15
shrq $6,%r14
rorq $19,%r15
xorq %r13,%r12
xorq %r14,%r15
addq 72(%rsp),%r12
addq 0(%rsp),%r12
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Unix Assembly", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0012.isa/around_asm.s", "license": "mit", "size": 750} |
### File: benchmark/0012.isa/around_cpp.s
rorq $14, %rsi
movq %rsi, %rbp
movq %r9, %rsi
rorq $18, %rsi
rolq $30, %r14
xorq %rbp, %rsi
movq %r9, %rbp
rolq $23, %rbp
xorq %rbp, %rsi
addq %rsi, %r13
movq %rdx, %rsi
xorq %rcx, %rsi
addq %r13, %r11
movq %rsi, %rbp
movq %rcx, %rsi
rorq $28, %rsi
andq %rbp, %... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Unix Assembly", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0012.isa/around_cpp.s", "license": "mit", "size": 977} |
### File: benchmark/0012.isa/sha512.cc
/*
Use sha512 to measure performance of ISA
*/
#include<fast_io_crypto.h>
#if __has_cpp_attribute(__gnu__::__flatten__)
[[__gnu__::__flatten__]]
#endif
void sha512_invoker(::std::uint_least64_t* state,::std::byte const* first,::std::byte const* last) noexcept
{
::fast_io::deta... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0012.isa/sha512.cc", "license": "mit", "size": 340} |
### File: benchmark/0012.isa/sha512_loongarch64_gcc.s
.file "sha512.cc"
.text
.align 2
.globl _Z14sha512_invokerPmPKSt4byteS2_
.type _Z14sha512_invokerPmPKSt4byteS2_, @function
_Z14sha512_invokerPmPKSt4byteS2_:
ld.d $r12,$r4,16
addi.d $r3,$r3,-256
st.d $r22,$r3,248
st.d $r12,$r3,80
ld.d $r12,$r4,24
st.d $r31... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Unix Assembly", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0012.isa/sha512_loongarch64_gcc.s", "license": "mit", "size": 28683} |
### File: benchmark/0012.isa/sha512_openssl.s
.text
.globl sha512_block_data_order
.type sha512_block_data_order,@function
.align 16
sha512_block_data_order:
.cfi_startproc
movq %rsp,%rax
.cfi_def_cfa_register %rax
pushq %rbx
.cfi_offset %rbx,-16
pushq %rbp
.cfi_offset %rbp,-24
pushq %r12
.cfi_offset %r12,-32
p... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Unix Assembly", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0012.isa/sha512_openssl.s", "license": "mit", "size": 25824} |
### File: benchmark/0012.isa/sha512_x86_64_clang.s
.text
.file "sha512.cc"
.globl _Z14sha512_invokerPmPKSt4byteS2_ # -- Begin function _Z14sha512_invokerPmPKSt4byteS2_
.p2align 4, 0x90
.type _Z14sha512_invokerPmPKSt4byteS2_,@function
_Z14sha512_invokerPmPKSt4byteS2_: # @_Z14sha512_invokerPmPKSt4byteS2_
# %bb... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Unix Assembly", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0012.isa/sha512_x86_64_clang.s", "license": "mit", "size": 42234} |
### File: benchmark/0012.isa/sha512_x86_64_gcc.s
.file "sha512.cc"
.text
.p2align 4
.globl _Z14sha512_invokerPmPKSt4byteS2_
.type _Z14sha512_invokerPmPKSt4byteS2_, @function
_Z14sha512_invokerPmPKSt4byteS2_:
pushq %r15
pushq %r14
pushq %r13
pushq %r12
pushq %rbp
pushq %rbx
subq $80, %rsp
movq (%rdi), %rax
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "Unix Assembly", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0012.isa/sha512_x86_64_gcc.s", "license": "mit", "size": 29012} |
### File: benchmark/0013.bitset/filebuf_file.cc
#include<bitset>
#include<fast_io_legacy.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
#if __cpp_lib_constexpr_bitset >= 202207L
constexpr
#endif
std::bitset<152> bts("1101111000001111111111111111111111111011011110000011111111111111111... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0013.bitset/filebuf_file.cc", "license": "mit", "size": 570} |
### File: benchmark/0013.bitset/ostream.cc
#include<bitset>
#include<fast_io_legacy.h>
#include<fast_io_driver/timer.h>
int main()
{
#if __cpp_lib_constexpr_bitset >= 202207L
constexpr
#endif
std::bitset<152> bts("11011110000011111111111111111111111110110111100000111111111111111111111111101101111000001111111111111... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0013.bitset/ostream.cc", "license": "mit", "size": 575} |
### File: benchmark/0013.bitset/u8c_file.cc
#include<bitset>
#include<fast_io.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
#if __cpp_lib_constexpr_bitset >= 202207L
constexpr
#endif
std::bitset<152> bts("110111100000111111111111111111111111101101111000001111111111111111111111111011... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0013.bitset/u8c_file.cc", "license": "mit", "size": 551} |
### File: benchmark/0013.bitset/u8c_file_unlocked.cc
#include<bitset>
#include<fast_io.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
#if __cpp_lib_constexpr_bitset >= 202207L
constexpr
#endif
std::bitset<152> bts("110111100000111111111111111111111111101101111000001111111111111111111... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0013.bitset/u8c_file_unlocked.cc", "license": "mit", "size": 578} |
### File: benchmark/0013.bitset/u8obuf_file.cc
#include<bitset>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
#if __cpp_lib_constexpr_bitset >= 202207L
constexpr
#endif
std::bitset<152> bts("110111100000111111111111111111111111101101111000... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0013.bitset/u8obuf_file.cc", "license": "mit", "size": 587} |
### File: benchmark/0014.codecvt/u16utf8_file.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(1000000);
{
fast_io::timer t(u8"output");
fast_io::u16outf8_file obf(u8"u16utf8_file.txt");
for(std... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0014.codecvt/u16utf8_file.cc", "license": "mit", "size": 541} |
### File: benchmark/0014.codecvt/u32utf8_file.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(1000000);
{
fast_io::timer t(u8"output");
fast_io::u32outf8_file obf(u8"u32utf8_file.txt");
for(std... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0014.codecvt/u32utf8_file.cc", "license": "mit", "size": 541} |
### File: benchmark/0014.codecvt/u8iobuf_file.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
constexpr std::size_t N(1000000);
{
fast_io::timer t(u8"output");
fast_io::u8obuf_file obf(u8"u8iobuf_file.txt");
for(std::... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0014.codecvt/u8iobuf_file.cc", "license": "mit", "size": 538} |
### File: benchmark/0015.string/istream.cc
#include<string>
#include<fast_io_legacy.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
std::size_t lines{};
{
fast_io::timer t(u8"input");
fast_io::filebuf_file fbf(u8"ibuf_white_hole_engine.txt",fast_io::open_mode::in);
std::istream f... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0015.string/istream.cc", "license": "mit", "size": 357} |
### File: benchmark/0015.string/random_data.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<random>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main(int argc, char** argv)
{
std::size_t n{100000};
if(1<argc)
{
n=fast_io::to<std::size_t>(fast_io::mnp::os_c_str(argv[1]));
}
fast_... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0015.string/random_data.cc", "license": "mit", "size": 1041} |
### File: benchmark/0015.string/scan.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
std::size_t spaces{};
{
fast_io::timer t(u8"input");
fast_io::u8ibuf_file ibf(u8"ibuf_white_hole_engine.txt");
for... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0015.string/scan.cc", "license": "mit", "size": 356} |
### File: benchmark/0015.string/scan_fbf.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_legacy.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
std::size_t spaces{};
{
fast_io::timer t(u8"input");
//use std::filebuf_file to provide a fair comparis... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0015.string/scan_fbf.cc", "license": "mit", "size": 465} |
### File: benchmark/0015.string/scan_qstring.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<fast_io_driver/qt.h>
using namespace fast_io::io;
int main()
{
std::size_t spaces{};
{
fast_io::timer t(u8"input");
fast_io::u8ibuf_file ibf(u8"ibuf_white_hole_engine.txt");
... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0015.string/scan_qstring.cc", "license": "mit", "size": 372} |
### File: benchmark/0015.string/scan_qstring_u16utf8.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<fast_io_driver/qt.h>
using namespace fast_io::io;
int main()
{
std::size_t spaces{};
{
fast_io::timer t(u8"input");
fast_io::u16iutf8_file ibf(u8"ibuf_white_hole_engine... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0015.string/scan_qstring_u16utf8.cc", "license": "mit", "size": 374} |
### File: benchmark/0015.string/scan_strlike.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
std::size_t spaces{};
{
fast_io::timer t(u8"input");
fast_io::u8ibuf_file ibf(u8"ibuf_white_hole_engine.txt");
for(std::u8st... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0015.string/scan_strlike.cc", "license": "mit", "size": 363} |
### File: benchmark/0015.string/scan_u16string_u16utf8.cc
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
std::size_t spaces{};
{
fast_io::timer t(u8"input");
fast_io::u16iutf8_file ibf(u8"ibuf_white_hole_engine.txt");
f... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0015.string/scan_u16string_u16utf8.cc", "license": "mit", "size": 372} |
### File: benchmark/0015.string/scan_winrt_hstring.cc
#include<winrt/base.h>
#include<string>
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_driver/timer.h>
#include<vector>
using namespace fast_io::io;
int main()
{
std::size_t spaces{};
{
fast_io::timer t(u8"input");
fast_io::u8ibuf_file ibf(u... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0015.string/scan_winrt_hstring.cc", "license": "mit", "size": 409} |
### File: benchmark/0016.endl/filebuf_file.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_legacy.h>
#include<fast_io_driver/timer.h>
using namespace fast_io::io;
int main()
{
fast_io::timer tm(u8"u8filebuf_file");
fast_io::filebuf_file fbf(u8"filebuf_file.txt",fast_io::open_mode::out);
for(std::... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0016.endl/filebuf_file.cc", "license": "mit", "size": 334} |
### File: benchmark/0016.endl/ofstream.cc
#include<fast_io.h>
#include<fast_io_device.h>
#include<fast_io_legacy.h>
#include<fast_io_driver/timer.h>
int main()
{
fast_io::timer tm(u8"ofstream");
fast_io::filebuf_file fbf(u8"ofstream.txt",fast_io::open_mode::out);
std::ostream fout(fbf.fb);
for(std::size_t i{};i!=1... | {"idx": "gitee_code", "domain": "code", "domain2": "gitee-permissive", "header_footer": "", "lang": "en", "source": "gitee_code-0.jsonl", "prog_lang": "C++", "repo_name": "vincent_personan/fast_io", "path": "benchmark/0016.endl/ofstream.cc", "license": "mit", "size": 319} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.