[{"data":1,"prerenderedAt":137},["ShallowReactive",2],{"blog-post-hyperfine-ignore-failed-commands":3,"recent-posts":76},{"id":4,"uid":5,"url":6,"type":7,"href":8,"tags":9,"first_publication_date":10,"last_publication_date":10,"slugs":11,"linked_documents":13,"lang":14,"alternate_languages":15,"data":16},"awBNkRIAACkAFJ-i","hyperfine-ignore-failed-commands",null,"blog_posts","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awi2cRIAACwAhxgS&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awBNkRIAACkAFJ-i%22%29+%5D%5D",[],"2026-11-26T22:45:05+0000",[12],"hyperfine-how-to-ignore-failed-commands",[],"en-us",[],{"title":17,"date":23,"description":24,"image":29,"content":39},[18],{"type":19,"text":20,"spans":21,"direction":22},"heading1","Hyperfine: How to Ignore Failed Commands",[],"ltr","2026-11-26",[25],{"type":26,"text":27,"spans":28,"direction":22},"heading2","Learn how to ignore failed commands when benchmarking with hyperfine",[],{"dimensions":30,"alt":20,"copyright":6,"url":33,"id":34,"edit":35},{"width":31,"height":32},1280,720,"https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FAMFaZnjnMgvMMALa_hyperfine-ignore-failed-commands.png?auto=format,compress","AMFaZnjnMgvMMALa",{"x":36,"y":36,"zoom":37,"background":38},0,1,"transparent",[40,44,48,51,54,57,60,63,66,69,73],{"type":41,"text":42,"spans":43,"direction":22},"paragraph","Before we start, make sure you have hyperfine installed on your computer. If you don't have it yet, run this command:",[],{"type":45,"text":46,"spans":47,"direction":22},"preformatted","brew install hyperfine",[],{"type":41,"text":49,"spans":50,"direction":22},"By default, hyperfine stops as soon as a command exits with a non-zero status code. For example, \u003Ccode>grep\u003C\u002Fcode> exits with \u003Ccode>1\u003C\u002Fcode> when it finds no match, so this benchmark fails straight away:",[],{"type":45,"text":52,"spans":53,"direction":22},"hyperfine 'grep -q banana notes.txt'",[],{"type":41,"text":55,"spans":56,"direction":22},"To keep going, add the \u003Ccode>-i\u003C\u002Fcode> flag, short for \u003Ccode>--ignore-failure\u003C\u002Fcode>, before your command:",[],{"type":45,"text":58,"spans":59,"direction":22},"hyperfine -i 'grep -q banana notes.txt'",[],{"type":41,"text":61,"spans":62,"direction":22},"Hyperfine now runs the command as many times as it needs and prints the usual results, plus a small warning that it ignored the non-zero exit code.",[],{"type":41,"text":64,"spans":65,"direction":22},"If you only want to ignore the exit codes you expect, pass them after an equals sign. Just remember to replace \u003Ccode>1\u003C\u002Fcode> with the code your command returns:",[],{"type":45,"text":67,"spans":68,"direction":22},"hyperfine --ignore-failure=1 'grep -q banana notes.txt'",[],{"type":70,"oembed":71},"embed",{"embed_url":72,"type":70},"",{"type":41,"text":74,"spans":75,"direction":22},"One more tip: failed runs are still timed, so a command that crashes straight away will make your average look faster than it really is. If a command is failing and you don't know why, run it with \u003Ccode>--show-output\u003C\u002Fcode> first to see everything it prints.",[],{"results":77,"page":37,"results_per_page":135,"results_size":135,"total_results_size":136,"total_pages":37},[78,97,116],{"id":79,"uid":80,"url":6,"type":7,"href":81,"tags":82,"first_publication_date":10,"last_publication_date":10,"slugs":83,"linked_documents":85,"lang":14,"alternate_languages":86,"data":87},"awBNkxIAACkAFJ-q","hyperfine-multiple-parameters","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awi2cRIAACwAhxgS&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awBNkxIAACkAFJ-q%22%29+%5D%5D",[],[84],"hyperfine-how-to-run-multiple-parameters",[],[],{"image":88,"title":94},{"dimensions":89,"alt":90,"copyright":6,"url":91,"id":92,"edit":93},{"width":31,"height":32},"Hyperfine: How to Run Multiple Parameters","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002F_l5pwA96nzZYxC9L_hyperfine-multiple-parameters.png?auto=format,compress","_l5pwA96nzZYxC9L",{"x":36,"y":36,"zoom":37,"background":38},[95],{"type":19,"text":90,"spans":96,"direction":22},[],{"id":98,"uid":99,"url":6,"type":7,"href":100,"tags":101,"first_publication_date":10,"last_publication_date":10,"slugs":102,"linked_documents":104,"lang":14,"alternate_languages":105,"data":106},"awBNlhIAACoAFJ-_","bat-show-line-numbers","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awi2cRIAACwAhxgS&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awBNlhIAACoAFJ-_%22%29+%5D%5D",[],[103],"bat-how-to-show-line-numbers",[],[],{"image":107,"title":113},{"dimensions":108,"alt":109,"copyright":6,"url":110,"id":111,"edit":112},{"width":31,"height":32},"Bat: How to Show Line Numbers","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002F9EACcMMdCc_YmGGd_bat-show-line-numbers.png?auto=format,compress","9EACcMMdCc_YmGGd",{"x":36,"y":36,"zoom":37,"background":38},[114],{"type":19,"text":109,"spans":115,"direction":22},[],{"id":117,"uid":118,"url":6,"type":7,"href":119,"tags":120,"first_publication_date":10,"last_publication_date":10,"slugs":121,"linked_documents":123,"lang":14,"alternate_languages":124,"data":125},"awBNlRIAAC4AFJ-5","bat-set-man-pager","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awi2cRIAACwAhxgS&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22awBNlRIAAC4AFJ-5%22%29+%5D%5D",[],[122],"bat-how-to-set-bat-as-the-man-pager",[],[],{"image":126,"title":132},{"dimensions":127,"alt":128,"copyright":6,"url":129,"id":130,"edit":131},{"width":31,"height":32},"Bat: How to Set Bat as the Man Pager","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FTkD7gMTS-unoDHu6_bat-set-man-pager.png?auto=format,compress","TkD7gMTS-unoDHu6",{"x":36,"y":36,"zoom":37,"background":38},[133],{"type":19,"text":128,"spans":134,"direction":22},[],3,99,1795733125375]