c# File.Exist() 는 느리다는데 전 잘 못느끼고 있었다가
챗방에서 알려줘서 찾아보니 이런글이 보이고
https://stackoverflow.com/questions/2225415/why-is-file-exists-much-slower-when-the-file-does-not-exist
그리고 전 c++에선 모든플랫폼 돌리기위해 표준함수 써야하는 상황에선 access 썼는데 stat 가 더빠르군요
https://stackoverflow.com/questions/12774207/fastest-way-to-check-if-a-file-exist-using-standard-c-c11-c
Method exists_test0 (ifstream): **0.485s** Method exists_test1 (FILE fopen): **0.302s** Method exists_test2 (posix access()): **0.202s** Method exists_test3 (posix stat()): **0.134s**
버그 해결을 위해 도움을 구하고, 도움을 주세요. 우리는 그렇게 발전합니다.
throw bug 는 프로그래밍에 대한 전분야를 다룹니다. 질문,논의거리,팁,정보공유 모든 것이 가능합니다. 프로그래밍과 관련이 없는 내용은 환영받지 못합니다.