[{"data":1,"prerenderedAt":111},["ShallowReactive",2],{"blog-post-hyperfine-export-results-csv":3,"recent-posts":67},{"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},"av7XFBIAAC0AmDzM","hyperfine-export-results-csv",null,"blog_posts","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awdlAxIAACcAJjXm&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22av7XFBIAAC0AmDzM%22%29+%5D%5D",[],"2026-11-25T22:45:23+0000",[12],"hyperfine-how-to-export-results-to-csv",[],"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 Export Results to CSV",[],"ltr","2026-11-25",[25],{"type":26,"text":27,"spans":28,"direction":22},"heading2","Learn how to export hyperfine benchmark results to CSV",[],{"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\u002FEnLW4_wsg-hN24G5_hyperfine-export-results-csv.png?auto=format,compress","EnLW4_wsg-hN24G5",{"x":36,"y":36,"zoom":37,"background":38},0,1,"transparent",[40,44,48,51,54,57,60,64],{"type":41,"text":42,"spans":43,"direction":22},"paragraph","Before we start, make sure you have hyperfine installed on your computer and your script ready in a folder. 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},"First, open your terminal and navigate to the folder that has your script. To save the results to a CSV file, run this command:",[],{"type":45,"text":52,"spans":53,"direction":22},"hyperfine --export-csv results.csv \"python3 script.py\"",[],{"type":41,"text":55,"spans":56,"direction":22},"The \u003Ccode>--export-csv\u003C\u002Fcode> option takes the name of the file, so you can swap \u003Ccode>results.csv\u003C\u002Fcode> for anything you like. Hyperfine benchmarks like normal and writes the file when it's done.",[],{"type":41,"text":58,"spans":59,"direction":22},"To make sure everything worked, run \u003Ccode>open results.csv\u003C\u002Fcode>. You get one row per command, with the mean, the standard deviation, the median, the min and the max, plus the memory use. Times are always in seconds, whatever you set with \u003Ccode>--time-unit\u003C\u002Fcode>.",[],{"type":61,"oembed":62},"embed",{"embed_url":63,"type":61},"",{"type":41,"text":65,"spans":66,"direction":22},"One more tip: the CSV only has summary numbers. If you want the time of every single run, use \u003Ccode>--export-json results.json\u003C\u002Fcode> instead.",[],{"results":68,"page":37,"results_per_page":109,"results_size":109,"total_results_size":110,"total_pages":37},[69,88,107],{"id":70,"uid":71,"url":6,"type":7,"href":72,"tags":73,"first_publication_date":10,"last_publication_date":10,"slugs":74,"linked_documents":76,"lang":14,"alternate_languages":77,"data":78},"av7XERIAACcAmDy5","hyperfine-benchmark-python-script","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awdlAxIAACcAJjXm&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22av7XERIAACcAmDy5%22%29+%5D%5D",[],[75],"hyperfine-how-to-benchmark-a-python-script",[],[],{"image":79,"title":85},{"dimensions":80,"alt":81,"copyright":6,"url":82,"id":83,"edit":84},{"width":31,"height":32},"Hyperfine: How to Benchmark a Python Script","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FwHSLchMR8qvd2IUQ_hyperfine-benchmark-python-script.png?auto=format,compress","wHSLchMR8qvd2IUQ",{"x":36,"y":36,"zoom":37,"background":38},[86],{"type":19,"text":81,"spans":87,"direction":22},[],{"id":89,"uid":90,"url":6,"type":7,"href":91,"tags":92,"first_publication_date":10,"last_publication_date":10,"slugs":93,"linked_documents":95,"lang":14,"alternate_languages":96,"data":97},"av7XDxIAACkAmDyy","imagemagick-optimize-images","https:\u002F\u002Fmarks-personal-website.cdn.prismic.io\u002Fapi\u002Fv2\u002Fdocuments\u002Fsearch?ref=awdlAxIAACcAJjXm&q=%5B%5B%3Ad+%3D+at%28document.id%2C+%22av7XDxIAACkAmDyy%22%29+%5D%5D",[],[94],"imagemagick-how-to-optimize-images",[],[],{"image":98,"title":104},{"dimensions":99,"alt":100,"copyright":6,"url":101,"id":102,"edit":103},{"width":31,"height":32},"ImageMagick: How to Optimize Images","https:\u002F\u002Fimages.prismic.io\u002Fmarks-personal-website\u002FUCjpRnL5HVuoeJpz_imagemagick-optimize-images.png?auto=format,compress","UCjpRnL5HVuoeJpz",{"x":36,"y":36,"zoom":37,"background":38},[105],{"type":19,"text":100,"spans":106,"direction":22},[],{"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":108},{"image":29,"title":17},3,94,1795646747354]