{"id":26126,"date":"2014-12-22T22:29:16","date_gmt":"2014-12-22T13:29:16","guid":{"rendered":"http:\/\/www.softantenna.com\/wp\/?p=26126"},"modified":"2014-12-22T22:29:16","modified_gmt":"2014-12-22T13:29:16","slug":"grab","status":"publish","type":"post","link":"https:\/\/softantenna.com\/blog\/grab\/","title":{"rendered":"\u901a\u5e38\u7248grep\u3088\u308a100%\u9ad8\u901f\u306agrep\u5b9f\u88c5\u300cgrab\u300d"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/softantenna.com\/blog\/wp-content\/uploads\/2014\/12\/Igrab.png\" alt=\"Grab\" title=\"grab.png\" border=\"0\" width=\"546\" height=\"318\" \/><\/p>\n<p>\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u6587\u5b57\u5217\u3067\u691c\u7d22\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u300cgrep\u300d\u306f\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u3092\u6271\u3046\u4e0a\u3067\u3001\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\u30c4\u30fc\u30eb\u3068\u3044\u3063\u3066\u3082\u904e\u8a00\u3067\u306f\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002grep\u306f\u9577\u3044\u6b74\u53f2\u3092\u6301\u3064\u30c4\u30fc\u30eb\u3067\u3001\u305d\u308c\u81ea\u4f53\u5c11\u3057\u3065\u3064\u6539\u826f\u3055\u3066\u304d\u3066\u3044\u307e\u3059\u304c\u3001\u6700\u8fd1\u306f\u3082\u3063\u3068\u7a4d\u6975\u7684\u306b\u9ad8\u901f\u6027\u3092\u8ffd\u6c42\u3057\u305fgrep\u7684\u306a\u30c4\u30fc\u30eb\u3082\u958b\u767a\u3055\u308c\u3066\u304d\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>\u4eca\u56de\u7d39\u4ecb\u3059\u308b\u300c<a href=\"https:\/\/github.com\/stealth\/grab\">grab<\/a>\u300d\u3082\u305d\u306e\u4e2d\u306e\u4e00\u3064\u3002\u8907\u6570\u30b3\u30a2\u3092\u4f7f\u3063\u305f\u691c\u7d22\u306e\u4e26\u5217\u5316\u3084(\u305f\u3060\u3057\u307b\u3068\u3093\u3069\u306e\u5834\u5408\u9045\u304f\u306a\u308b\u3089\u3057\u3044)\u3001mmap\u3068MAP_POPULATE\u306e\u4f7f\u7528\u3001PCRE\u306eJIT\u6a5f\u80fd\u306a\u3069\u3092\u4f7f\u3063\u305f\u9ad8\u901f\u5316\u306e\u6280\u6cd5\u3092\u7d44\u5408\u305b\u3001SSD\u4e0a\u3067100%\u306e\u5287\u7684\u306a\u30d1\u30d5\u30a9\u30fc\u30de\u30f3\u30b9\u306e\u5411\u4e0a\u3092\u6210\u3057\u9042\u3052\u305f\u3068\u3044\u3046\u3053\u3068\u3067\u3059\u3002<\/p>\n<p><!--more--><\/p>\n<h3>\u3057\u304b\u3057\u3055\u3089\u306b\u4e0a\u624b\u304c\u2026<\/h3>\n<p><a href=\"https:\/\/news.ycombinator.com\/item?id=8781245\">Hacker News<\/a>\u3067\u300cgrab\u300d\u306e\u8a71\u984c\u304c\u53d6\u308a\u4e0a\u3052\u3089\u308c\u305f\u5f8c\u3001\u9ad8\u901f\u5316grep\u306e\u5148\u99c6\u8005\u3001\u300c<a href=\"https:\/\/github.com\/ggreer\/the_silver_searcher\">The Silver Searcher<\/a>\u300d(\u30b3\u30de\u30f3\u30c9\u540dag)\u306e\u4f5c\u8005\u304c\u81ea\u3089\u30d9\u30f3\u30c1\u30de\u30fc\u30af\u3092\u884c\u3044\u3001grab\u306e\u8a55\u4fa1\u3092\u884c\u3063\u3066\u3044\u307e\u3057\u305f\u3002<\/p>\n<pre>\nggreer@boron:~\/code% du -sh .\n8.3G\t.\n\nggreer@boron:~\/code% time ag cpu_set_t\nag cpu_set_t  4.45s user 5.25s system 295% cpu 3.285 total\n\nggreer@boron:~\/code% time grab -R cpu_set_t .\ngrab -R cpu_set_t .  13.31s user 21.67s system 35% cpu 1:38.28 total\n<\/pre>\n<p>ag\u304c\u7d043\u79d2\u3067\u691c\u7d22\u7d42\u4e86\u3059\u308b\u306e\u306b\u5bfe\u3057\u3001grab\u306f1\u520638\u79d2\u3082\u304b\u304b\u308a\u3001<span class=\"mybold\">30\u500d\u4ee5\u4e0aag\u306e\u65b9\u304c\u901f\u3044<\/span>\u3068\u3044\u3046\u7d50\u679c\u304c\u3067\u3066\u3044\u307e\u3059\u3002ag\u304c\u4f7f\u3063\u3066\u3044\u308b\u30d5\u30a1\u30a4\u30eb\u9664\u5916\u6a5f\u80fd\u3092\u6291\u5236\u3057\u3066\u3082<span class=\"mybold\">\u307e\u30602\u500d\u901f\u3044<\/span>\u3068\u3044\u3046\u7d50\u679c\u304c\u3067\u3066\u3044\u308b\u306e\u3067\u3001\u5b9f\u7528\u9762\u3067\u306fag\u306e\u307b\u3046\u304c\u4e0a\u56de\u3063\u3066\u3044\u308b\u3068\u3044\u3048\u305d\u3046\u3067\u3059\u3002<\/p>\n<p>\u307e\u305f\u3001grab\u306e\u9ad8\u901f\u5316\u6280\u6cd5\u306e\u4e2d\u306b\u306f\u3059\u3050\u306b\u53d6\u308a\u5165\u308c\u308b\u3053\u3068\u304c\u3067\u304d\u305d\u3046\u306a\u30c6\u30af\u30cb\u30c3\u30af\u304c\u3044\u304f\u3064\u304b\u4f7f\u308f\u308c\u3066\u3044\u308b\u3068\u5206\u6790\u3057\u3001The Silver Searcher\u306e\u3055\u3089\u306a\u308b\u6539\u826f\u306b\u610f\u6b32\u3092\u898b\u305b\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>Hacker News\u3067\u306f\u3001grab\u3001The Silver Searcher\u306e\u4ed6\u306b\u3001<a href=\"http:\/\/beyondgrep.com\/\">ack<\/a>\u3068\u3044\u3046\u6539\u826f\u7248grep\u306e\u8a71\u984c\u3082\u3067\u3066\u3044\u307e\u3057\u305f\u304c\u3001The Silver Searcher\u3092\u4e0a\u56de\u308b\u9ad8\u901f\u691c\u7d22\u30bd\u30d5\u30c8\u306f\u5b58\u5728\u3057\u306a\u3044\u69d8\u5b50\u3002grab\u306e\u9ad8\u901f\u5316\u624b\u6cd5\u3092\u5c0e\u5165\u3057\u3066\u3055\u3089\u306b\u9ad8\u901f\u5316\u3055\u308c\u308c\u3070\u3001\u5f53\u9762The Silver Searcher\u306e\u738b\u5ea7\u306f\u63fa\u308b\u304e\u306a\u3044\u3082\u306e\u306b\u306a\u308b\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30d5\u30a1\u30a4\u30eb\u306e\u4e2d\u8eab\u3092\u6587\u5b57\u5217\u3067\u691c\u7d22\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u30e6\u30fc\u30c6\u30a3\u30ea\u30c6\u30a3\u300cgrep\u300d\u306f\u3001\u30b3\u30f3\u30d4\u30e5\u30fc\u30bf\u30fc\u3092\u6271\u3046\u4e0a\u3067\u3001\u306a\u304f\u3066\u306f\u306a\u3089\u306a\u3044\u30c4\u30fc\u30eb\u3068\u3044\u3063\u3066\u3082\u904e\u8a00\u3067\u306f\u306a\u3044\u304b\u3082\u3057\u308c\u307e\u305b\u3093\u3002grep\u306f\u9577\u3044\u6b74\u53f2\u3092\u6301\u3064\u30c4\u30fc\u30eb\u3067\u3001\u305d\u308c\u81ea\u4f53\u5c11\u3057\u3065\u3064\u6539\u826f\u3055\u3066\u304d [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":26125,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[75],"tags":[2873,352],"class_list":["post-26126","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-software","tag-grab","tag-grep"],"_links":{"self":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/26126","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/comments?post=26126"}],"version-history":[{"count":0,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/posts\/26126\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media\/26125"}],"wp:attachment":[{"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/media?parent=26126"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/categories?post=26126"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softantenna.com\/blog\/wp-json\/wp\/v2\/tags?post=26126"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}