Skip to content

Instantly share code, notes, and snippets.

@eXpl0it3r
Created June 10, 2018 21:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eXpl0it3r/2a7871abb79eca22daa3f94335fa5b1d to your computer and use it in GitHub Desktop.
Save eXpl0it3r/2a7871abb79eca22daa3f94335fa5b1d to your computer and use it in GitHub Desktop.
Visual Studio - std::ftell performance issue
#define _CRT_SECURE_NO_WARNINGS
#include <cstdio>
#include <chrono>
int main()
{
using namespace std::chrono_literals;
auto f = std::fopen("test.dat", "rb");
auto end = std::chrono::high_resolution_clock::now() + 10s;
while (std::chrono::high_resolution_clock::now() < end)
std::ftell(f);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment