{"id":30202981,"url":"https://github.com/vimkim/simdscan-py","last_synced_at":"2025-08-13T11:13:59.202Z","repository":{"id":298273986,"uuid":"999369938","full_name":"vimkim/simdscan-py","owner":"vimkim","description":"SIMD instruction scan and report util","archived":false,"fork":false,"pushed_at":"2025-06-10T08:06:16.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-10T09:23:57.840Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","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/vimkim.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,"zenodo":null}},"created_at":"2025-06-10T06:40:00.000Z","updated_at":"2025-06-10T08:06:19.000Z","dependencies_parsed_at":"2025-06-10T09:24:32.592Z","dependency_job_id":"a56fe3ae-0045-4628-af82-161bd5ce12f5","html_url":"https://github.com/vimkim/simdscan-py","commit_stats":null,"previous_names":["vimkim/simdscan-py"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vimkim/simdscan-py","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimkim%2Fsimdscan-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimkim%2Fsimdscan-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimkim%2Fsimdscan-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimkim%2Fsimdscan-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vimkim","download_url":"https://codeload.github.com/vimkim/simdscan-py/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vimkim%2Fsimdscan-py/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270228636,"owners_count":24548876,"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","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"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":"2025-08-13T11:13:48.545Z","updated_at":"2025-08-13T11:13:59.148Z","avatar_url":"https://github.com/vimkim.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# simdscan.py\n\nA command-line tool for analyzing SIMD instruction usage in compiled binaries. Inspects x86-64 binaries (ELF, Mach-O, PE) and provides detailed statistics on SIMD operations by ISA extension.\n\n## Features\n\n- **SIMD Detection**: Automatically identifies and counts SIMD instructions in binary files\n- **ISA Classification**: Categorizes instructions by extension (SSE, SSE2, SSE4, AVX, AVX2, etc.)\n- **Multiple Output Formats**: Support for JSON and YAML output\n- **Detailed Breakdown**: Optional per-ISA instruction analysis with occurrence counts\n- **Cross-Platform**: Works with ELF, Mach-O, and PE binary formats\n\n## Requirements\n\n- Linux system with `objdump` installed\n- Python 3.6+\n- Optional: PyYAML for YAML output format\n\n## Installation\n\n```bash\n# Clone or download simdscan.py\nchmod +x simdscan.py\n```\n\n## Usage\n\n### Basic Usage\n\n```bash\n./simdscan.py \u003cbinary_file\u003e\n```\n\n### Options\n\n- `-f, --format {json,yaml}`: Output format (default: json)\n- `--show-insts`: Include detailed per-ISA instruction breakdown\n- `-h, --help`: Show help message\n\n### Examples\n\n**Analyze a library file:**\n\n```bash\n./simdscan.py libfaiss.a\n```\n\n**Output with instruction details:**\n\n```bash\n./simdscan.py --show-insts libmath.so\n```\n\n**YAML format output:**\n\n```bash\n./simdscan.py -f yaml binary_file\n```\n\n## Sample Output\n\n### Basic Analysis\n\n```json\n{\n  \"binary\": \"libfaiss.a\",\n  \"has_simd\": true,\n  \"isa_summary\": {\n    \"SSE\": 96629,\n    \"SSE2\": 26378\n  },\n  \"total_simd_insts\": 123007\n}\n```\n\n### With AVX Instructions\n\n```json\n{\n  \"binary\": \"libfaiss_avx2.a\",\n  \"has_simd\": true,\n  \"isa_summary\": {\n    \"AVX\": 58825,\n    \"SSE4\": 4078\n  },\n  \"total_simd_insts\": 62903\n}\n```\n\n### Detailed Breakdown (with --show-insts)\n\n```json\n{\n  \"binary\": \"example.so\",\n  \"has_simd\": true,\n  \"isa_summary\": {\n    \"SSE\": 1024,\n    \"AVX\": 512\n  },\n  \"total_simd_insts\": 1536,\n  \"isa_details\": {\n    \"SSE\": {\n      \"unique_mnemonics\": 15,\n      \"occurrences\": {\n        \"movaps\": 256,\n        \"addps\": 128,\n        \"mulps\": 64\n      }\n    },\n    \"AVX\": {\n      \"unique_mnemonics\": 12,\n      \"occurrences\": {\n        \"vmovaps\": 128,\n        \"vaddps\": 96,\n        \"vmulps\": 48\n      }\n    }\n  }\n}\n```\n\n## How It Works\n\n1. **Disassembly**: Uses `objdump` to disassemble the target binary\n2. **Pattern Matching**: Identifies SIMD instructions using mnemonic patterns\n3. **Classification**: Categorizes instructions by their corresponding ISA extensions\n4. **Aggregation**: Counts occurrences and provides summary statistics\n\n## Supported ISA Extensions\n\n- SSE (Streaming SIMD Extensions)\n- SSE2, SSE3, SSSE3, SSE4.1, SSE4.2\n- AVX (Advanced Vector Extensions)\n- AVX2, AVX-512\n- And other x86-64 SIMD instruction sets\n\n## Use Cases\n\n- **Performance Analysis**: Identify SIMD utilization in optimized code\n- **Compiler Verification**: Verify that auto-vectorization is working\n- **Library Comparison**: Compare SIMD usage between different builds\n- **Architecture Targeting**: Ensure binaries use appropriate instruction sets\n\n## Limitations\n\n- Requires `objdump` to be available in PATH\n- Only supports x86-64 architecture\n- Static analysis only (doesn't consider runtime execution frequency)\n\n## License\n\nApache License 2.0\n\n## Contributing\n\nAs you wish!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimkim%2Fsimdscan-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvimkim%2Fsimdscan-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvimkim%2Fsimdscan-py/lists"}