본문 바로가기 메뉴 바로가기

Talk is cheap. Show me the code.

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

Talk is cheap. Show me the code.

검색하기 폼
  • All (28)
    • Dev (9)
      • C & C++ (4)
      • Android (1)
      • Kotlin (3)
      • Python (1)
    • Algorithm (12)
    • Tistory (4)
    • Linux (1)
    • Tips (1)
    • Life (1)
  • 방명록

Dev/Python (1)
Python_파일 I/O scandir

IntroPython 3.6 부터 제공하는 os.scandir 기능 system call 과 win32의 기능을 토대로 만들었기 때문에 속도가 어마어마 하게 빠르다. (os.walk 보다 2배~20배 빠르다.) 필자도 빨라봐야 얼마나 빠르겠어 하고 사용해봤는데 결과는... 놀랍다.. 기존에 os.walk 혹은 os.walk기반의 listdir을 사용하여 기능을 구현한 부분이 있으면 빠르게 마이그레이션을 하는것을 추천한다.Snippet txt_files = [entry for entry in os.scandir(dir) if entry.name.endswith('txt')] #with extension dirs = [entry for entry in os.scandir(dir) if entry.is_dir..

Dev/Python 2017. 11. 28. 15:29
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • StackOverflow
TAG
  • 도메인
  • algorithm
  • highlightjs
  • 비트연산자
  • Kotlin
  • python
  • Math
  • 삼항연산자
  • Android
  • 안드로이드
  • Highlighter
  • DNS
  • robocopy
  • Bit
  • C
  • 비트
  • 수식
  • 비트마스크
  • syntax highlighting
  • mathjax
  • 행렬
  • mysql
  • Matrix
  • 알고리즘
more
«   2025/08   »
일 월 화 수 목 금 토
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
31
글 보관함

Blog is powered by Gom

티스토리툴바