{"id":13596564,"url":"https://github.com/StartAutomating/Benchpress","last_synced_at":"2025-04-09T16:33:04.426Z","repository":{"id":38333145,"uuid":"177236482","full_name":"StartAutomating/Benchpress","owner":"StartAutomating","description":"Easy Benchmarking with PowerShell","archived":false,"fork":false,"pushed_at":"2023-08-30T18:12:21.000Z","size":1253,"stargazers_count":53,"open_issues_count":11,"forks_count":4,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-24T08:46:01.345Z","etag":null,"topics":["benchmark","benchmarking","performance-testing","powershell"],"latest_commit_sha":null,"homepage":"https://benchpress.start-automating.com","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/StartAutomating.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":["StartAutomating"]}},"created_at":"2019-03-23T02:51:14.000Z","updated_at":"2024-11-22T10:42:45.000Z","dependencies_parsed_at":"2024-01-15T16:51:35.799Z","dependency_job_id":null,"html_url":"https://github.com/StartAutomating/Benchpress","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartAutomating%2FBenchpress","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartAutomating%2FBenchpress/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartAutomating%2FBenchpress/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/StartAutomating%2FBenchpress/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/StartAutomating","download_url":"https://codeload.github.com/StartAutomating/Benchpress/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247974712,"owners_count":21026742,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["benchmark","benchmarking","performance-testing","powershell"],"created_at":"2024-08-01T16:02:34.464Z","updated_at":"2025-04-09T16:32:59.416Z","avatar_url":"https://github.com/StartAutomating.png","language":"PowerShell","readme":"## Benchpress is a quick and easy benchmarking toolkit for PowerShell\n\nIt helps you write and manage simple comparative benchmarks.\nYou can use this information to make your scripts more efficient.\n\nFor instance, here's a quick Benchmark to determine if you should use Foreach statement or foreach object\n\n~~~PowerShell\nMeasure-Benchmark -Technique @{\n    ForeachObject = { 1..100 | Foreach-Object { $_ } }\n    ForeachStatement = { foreach ($n in 1..100) { $n }}\n}\n~~~\n\nYou can install Benchpress from the PowerShell Gallery:\n\n~~~PowerShell\nInstall-Module Benchpress -Scope CurrentUser -Force\n~~~\n\nBenchmark comes with a number of PowerShell Performance experiments.\n\n\n|Name                                                                                                                                                                                                         |Results                                                                                                                                           |\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|\n|[Best Way To Accumulate Pipeline Results (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/Best_Way_To_Accumulate_Pipeline_Results.benchmark.ps1)                    |[Best Way To Accumulate Pipeline Results (results)](docs/Best_Way_To_Accumulate_Pipeline_Results.benchmark.benchmarkOutput.md)                    |\n|[Checking If A File Exists (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/Checking_If_A_File_Exists.benchmark.ps1)                                                |[Checking If A File Exists (results)](docs/Checking_If_A_File_Exists.benchmark.benchmarkOutput.md)                                                |\n|[Comparing Command Lookup (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/Comparing_Command_Lookup.benchmark.ps1)                                                  |[Comparing Command Lookup (results)](docs/Comparing_Command_Lookup.benchmark.benchmarkOutput.md)                                                  |\n|[Creating Property Bags (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/Creating_Property_Bags.benchmark.ps1)                                                      |[Creating Property Bags (results)](docs/Creating_Property_Bags.benchmark.benchmarkOutput.md)                                                      |\n|[Different Ways To Iterate (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/Different_Ways_To_Iterate.benchmark.psd1)                                               |[Different Ways To Iterate (results)](docs/Different_Ways_To_Iterate.benchmark.benchmarkOutput.md)                                                |\n|[Different Ways To Set Many Variables (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/Different_Ways_To_Set_Many_Variables.benchmark.psd1)                         |[Different Ways To Set Many Variables (results)](docs/Different_Ways_To_Set_Many_Variables.benchmark.benchmarkOutput.md)                          |\n|[How Much Faster Is Piping To A ScriptBlock (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/How_Much_Faster_Is_Piping_To_A_ScriptBlock.benchmark.psd1)             |[How Much Faster Is Piping To A ScriptBlock (results)](docs/How_Much_Faster_Is_Piping_To_A_ScriptBlock.benchmark.benchmarkOutput.md)              |\n|[How Much Faster Is Splatting (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/How_Much_Faster_Is_Splatting.benchmark.ps1)                                          |[How Much Faster Is Splatting (results)](docs/How_Much_Faster_Is_Splatting.benchmark.benchmarkOutput.md)                                          |\n|[How Much Faster Is The Static Constructor (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/How_Much_Faster_Is_The_Static_Constructor.benchmark.psd1)               |[How Much Faster Is The Static Constructor (results)](docs/How_Much_Faster_Is_The_Static_Constructor.benchmark.benchmarkOutput.md)                |\n|[Is Using Faster (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/Is_Using_Faster.benchmark.ps1)                                                                    |[Is Using Faster (results)](docs/Is_Using_Faster.benchmark.benchmarkOutput.md)                                                                    |\n|[multithreading (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/multithreading.benchmark.ps1)                                                                      |[multithreading (results)](docs/multithreading.benchmark.benchmarkOutput.md)                                                                      |\n|[Random Number Generation (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/Random_Number_Generation.benchmark.ps1)                                                  |[Random Number Generation (results)](docs/Random_Number_Generation.benchmark.benchmarkOutput.md)                                                  |\n|[Should I Include The System Namespace (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/Should_I_Include_The_System_Namespace.benchmark.ps1)                        |[Should I Include The System Namespace (results)](docs/Should_I_Include_The_System_Namespace.benchmark.benchmarkOutput.md)                        |\n|[ToString Or Not ToString (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/ToString_Or_Not_ToString.benchmark.ps1)                                                  |[ToString Or Not ToString (results)](docs/ToString_Or_Not_ToString.benchmark.benchmarkOutput.md)                                                  |\n|[Ways To Hash A File (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/Ways_To_Hash_A_File.benchmark.ps1)                                                            |[Ways To Hash A File (results)](docs/Ways_To_Hash_A_File.benchmark.benchmarkOutput.md)                                                            |\n|[What Is The Fastest Way To Concatenate (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/What_Is_The_Fastest_Way_To_Concatenate.benchmark.json)                     |[What Is The Fastest Way To Concatenate (results)](docs/What_Is_The_Fastest_Way_To_Concatenate.benchmark.benchmarkOutput.md)                      |\n|[What Is The Fastest Way To Filter (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/What_Is_The_Fastest_Way_To_Filter.benchmark.ps1)                                |[What Is The Fastest Way To Filter (results)](docs/What_Is_The_Fastest_Way_To_Filter.benchmark.benchmarkOutput.md)                                |\n|[What Is The Fastest Way To Get All Loaded Modules (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/What_Is_The_Fastest_Way_To_Get_All_Loaded_Modules.benchmark.ps1)|[What Is The Fastest Way To Get All Loaded Modules (results)](docs/What_Is_The_Fastest_Way_To_Get_All_Loaded_Modules.benchmark.benchmarkOutput.md)|\n|[What Is The Fastest Way To Read A File (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/What_Is_The_Fastest_Way_To_Read_A_File.benchmark.ps1)                      |[What Is The Fastest Way To Read A File (results)](docs/What_Is_The_Fastest_Way_To_Read_A_File.benchmark.benchmarkOutput.md)                      |\n|[What Is The Fastest Way To Sort (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/What_Is_The_Fastest_Way_To_Sort.benchmark.ps1)                                    |[What Is The Fastest Way To Sort (results)](docs/What_Is_The_Fastest_Way_To_Sort.benchmark.benchmarkOutput.md)                                    |\n|[What Is The Quickest Way To Compare Types (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/What_Is_The_Quickest_Way_To_Compare_Types.benchmark.ps1)                |[What Is The Quickest Way To Compare Types (results)](docs/What_Is_The_Quickest_Way_To_Compare_Types.benchmark.benchmarkOutput.md)                |\n|[Whats In A Quote (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/Whats_In_A_Quote.benchmark.ps1)                                                                  |[Whats In A Quote (results)](docs/Whats_In_A_Quote.benchmark.benchmarkOutput.md)                                                                  |\n|[Which Random Is Faster (source)](https://github.com/StartAutomating/Benchpress/tree/master/PowerShellPerformance/Which_Random_Is_Faster.benchmark.ps1)                                                      |[Which Random Is Faster (results)](docs/Which_Random_Is_Faster.benchmark.benchmarkOutput.md)                                                      |\n\n\n\nYou can run all these built-in benchmarks by running.\n\n~~~PowerShell\nCheckpoint-Benchmark -ModuleName Benchpress\n~~~\n\n","funding_links":["https://github.com/sponsors/StartAutomating"],"categories":["PowerShell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStartAutomating%2FBenchpress","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FStartAutomating%2FBenchpress","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FStartAutomating%2FBenchpress/lists"}