{"id":16270880,"url":"https://github.com/mgrdich/go_c_benchmarking","last_synced_at":"2026-01-21T02:32:06.526Z","repository":{"id":197187230,"uuid":"695637285","full_name":"Mgrdich/Go_C_Benchmarking","owner":"Mgrdich","description":"Benchmarking Go and C","archived":false,"fork":false,"pushed_at":"2023-10-25T11:35:51.000Z","size":35,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-08T15:35:36.014Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Mgrdich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2023-09-23T19:09:10.000Z","updated_at":"2023-10-17T21:20:25.000Z","dependencies_parsed_at":"2023-10-05T11:40:44.626Z","dependency_job_id":"8f0d949e-4aec-42fb-980b-70fbef4aa875","html_url":"https://github.com/Mgrdich/Go_C_Benchmarking","commit_stats":null,"previous_names":["mgrdich/go_c_benchmarking"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Mgrdich/Go_C_Benchmarking","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mgrdich%2FGo_C_Benchmarking","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mgrdich%2FGo_C_Benchmarking/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mgrdich%2FGo_C_Benchmarking/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mgrdich%2FGo_C_Benchmarking/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mgrdich","download_url":"https://codeload.github.com/Mgrdich/Go_C_Benchmarking/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mgrdich%2FGo_C_Benchmarking/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28623260,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T23:49:58.628Z","status":"online","status_checked_at":"2026-01-21T02:00:08.227Z","response_time":86,"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":[],"created_at":"2024-10-10T18:11:51.646Z","updated_at":"2026-01-21T02:32:06.505Z","avatar_url":"https://github.com/Mgrdich.png","language":"Makefile","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Benchmarking with C and Go\n\nThis is a simple benchmarking app , with scripts and make commands to build any \narbitrary file and benchmark it's speed and performancea\n\n\nIn order to use this\n* you must have go `1.21.1` installed\n* you must have a C compiler called GCC\n\nif other versions of Go is found please update your `go.mod`a\n\nif other C compiler are found please update your makefile\n\n## Introduction\nTwo variations of code is here \n* one to calculate prime numbers up to N\n* one to calculate Sum of N numbers\n\nlatter is for compiler optimization example \n\nwe benchmark 4 versions \n* Native-Go: simple go program\n* Go: Go program that uses C\n* C: simple C program\n* COptimized: optimization flag set during the compilation\n\n\n## How to use it \n\n### To Build a binary\nlet's take the case of cgo for prime numbers\n* `make build-main-go-prime`\n* `go-exec-main-prime` exec file with this name by default , you can edit the makefile to put your custom names all the other make commands are with variables they will pick it up automatically\n* `make build-all-prime-exec` this one builds all the prime related exec\n\n\n### Test and Benchmark it\nThere is two bash scripts that take care of this one is and they create logs\nyou can change the log files name by changing the variables for the logs in the makefile\n\nHere is an example\n\n`outCPrimeFile:=output_c_prime`\n\n`outCCompilerPrimeFile:=output_c_compiler_prime`\n\n* `benchmarking.sh` for time it will redirect it to your upper configure file\n* `benchmarkMemoryStdOut.sh` to it will redirect to your upper configure file\n* `parse-native-data.go` that create an executable to calculate the average over those logs file\n\nto run a particular benchmark\n\n`make benchmark-c-sum` it will run all the benchmarking necessary and create log files\n\nOnce the Log files are created\n\nyou can run\n`make print-c-prime-data` which in its turn will compile the `parse-native-data.go`\nif it is not compiled and calculate the averages that those file did generate.\n\nEverything is automated you can customize and and add new stuff to it.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgrdich%2Fgo_c_benchmarking","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmgrdich%2Fgo_c_benchmarking","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmgrdich%2Fgo_c_benchmarking/lists"}