{"id":21483957,"url":"https://github.com/diamondinoia/benchmark_arch_optimization_flags","last_synced_at":"2026-04-19T14:03:31.467Z","repository":{"id":86140693,"uuid":"145454357","full_name":"DiamonDinoia/benchmark_arch_optimization_flags","owner":"DiamonDinoia","description":" I'm testing the differences between gcc/llvm with various optimization flags. Both performance and assembly are analyzed.","archived":false,"fork":false,"pushed_at":"2018-08-21T11:18:52.000Z","size":19,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-17T09:45:12.629Z","etag":null,"topics":["architecture","assem","assembly","clang","gcc","llvm","march","mtune","optimizations","pi"],"latest_commit_sha":null,"homepage":null,"language":"C++","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/DiamonDinoia.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-20T18:15:40.000Z","updated_at":"2018-08-21T11:18:53.000Z","dependencies_parsed_at":"2023-12-26T02:46:35.031Z","dependency_job_id":null,"html_url":"https://github.com/DiamonDinoia/benchmark_arch_optimization_flags","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DiamonDinoia/benchmark_arch_optimization_flags","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamonDinoia%2Fbenchmark_arch_optimization_flags","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamonDinoia%2Fbenchmark_arch_optimization_flags/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamonDinoia%2Fbenchmark_arch_optimization_flags/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamonDinoia%2Fbenchmark_arch_optimization_flags/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DiamonDinoia","download_url":"https://codeload.github.com/DiamonDinoia/benchmark_arch_optimization_flags/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DiamonDinoia%2Fbenchmark_arch_optimization_flags/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32009239,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-18T20:23:30.271Z","status":"online","status_checked_at":"2026-04-19T02:00:07.110Z","response_time":55,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["architecture","assem","assembly","clang","gcc","llvm","march","mtune","optimizations","pi"],"created_at":"2024-11-23T12:49:38.373Z","updated_at":"2026-04-19T14:03:31.462Z","avatar_url":"https://github.com/DiamonDinoia.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Benchmark and assembly analysis gcc/llvm architecture specific optimization\nHere I'm testing the differences between gcc/llvm with various optimization flags. Both performance and assembly are analyzed.\n\n- To build `./build.sh`\n- To run `./run.sh`\n- To generate the asm `./generate.sh`\n\n### The following combinations are tested:\n- GCC\n- GCC -O2\n- GCC -O2 -march=native\n- CLANG \n- CLANG -O2\n- CLANG -O2 -march=native\n\n### Test configurations\nCPU: `Intel(R) Core(TM) i7-7567U CPU @ 3.50GHz`.  \nOS: `Ubuntu 16-04` kernel 4.18.3 custom compiled.  \nmain: `dummy pi calculator`.  \ngcc (Ubuntu 8.1.0-5ubuntu1~16.04) 8.1.0  \nclang version 7.0.0 (trunk 338359) (llvm/trunk 338357)  \n\n# Results\niterations 1000000000 value 3.14159  \n\n- `clang` time 5.70893s  \n- `gcc` time 9.08183s  \n- `clang` -O2 time 6.01251s  \n- `gcc` -O2 time 5.13561s  \n- `clang` -march=native -O2 time 1.21312s  \n- `gcc` -march=native -O2 time 4.7192s  \n\n### References\n- http://lists.llvm.org/pipermail/cfe-dev/2016-March/048049.html\n- http://sdf.org/~riley/blog/2014/10/30/march-mtune/\n- https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiamondinoia%2Fbenchmark_arch_optimization_flags","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdiamondinoia%2Fbenchmark_arch_optimization_flags","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdiamondinoia%2Fbenchmark_arch_optimization_flags/lists"}