タグ

関連タグで絞り込む (0)

  • 関連タグはありません

タグの絞り込みを解除

あとで読むとperformanceに関するuneasyのブックマーク (1)

  • 俺のlsが遅すぎる - Qiita

    なぜ? 必要に迫られてオレオレなlsを書いたのだがなぜか遅い。大したことしていないのに遅い。 コード 特に変なところはないと思うのだけど... #include <stdio.h> #include <stdlib.h> #include <string.h> #include <sys/stat.h> #include <dirent.h> #include <pwd.h> int main(int argc, char** argv) { char fpath[PATH_MAX]; DIR* dir; struct dirent* dp; struct stat st; struct passwd *pw; char *dpath; dpath = (argc != 2) ? "." : argv[1]; dir = opendir(dpath); while ((dp = readd

    俺のlsが遅すぎる - Qiita
  • 1