# [Accelerate Bitmap Scanning with Neon and SVE Instructions on Arm servers](https://learn.arm.com/learning-paths/servers-and-cloud-computing/bitmap_scan_sve2/)

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/servers-and-cloud-computing/bitmap_scan_sve2/)
- [Optimize bitmap scanning in databases with SVE and Neon on Arm servers](https://learn.arm.com/learning-paths/servers-and-cloud-computing/bitmap_scan_sve2/01-introduction/)
- [Build and manage a bit vector in C](https://learn.arm.com/learning-paths/servers-and-cloud-computing/bitmap_scan_sve2/02-bitmap-data-structure/)
- [Implement scalar bitmap scanning in C](https://learn.arm.com/learning-paths/servers-and-cloud-computing/bitmap_scan_sve2/03-scalar-implementations/)
- [Vectorized bitmap scanning with Neon and SVE](https://learn.arm.com/learning-paths/servers-and-cloud-computing/bitmap_scan_sve2/04-vector-implementations/)
- [Benchmarking bitmap scanning across implementations](https://learn.arm.com/learning-paths/servers-and-cloud-computing/bitmap_scan_sve2/05-benchmarking-and-results/)
- [Applications and optimization best practices](https://learn.arm.com/learning-paths/servers-and-cloud-computing/bitmap_scan_sve2/06-application-and-best-practices/)
- [Next Steps](https://learn.arm.com/learning-paths/servers-and-cloud-computing/bitmap_scan_sve2/_next-steps/)

## About this Learning Path

| Skill level:      | Introductory       |
|-------------------|--------------------|
| Reading time:     | 20 min             |
| Last updated:     | 31 Jul 2026        |

| Author:                   | Pareena Verma, Arm [GitHub](https://github.com/pareenaverma) [LinkedIn](https://linkedin.com/in/pareena-verma-7853607) |
|---------------------------|-----------------------------------------------------------------------------------------------------------------------|
| Arm IP:                   | [Neoverse](https://support.arm.com/?tab=compute-ip&Product%20Type=Infrastructure%20Processors)                               |
| Tags:                     | [Performance and Architecture](https://learn.arm.com/tag/performance-and-architecture), [AWS](https://learn.arm.com/tag/aws), [Microsoft Azure](https://learn.arm.com/tag/microsoft-azure), [Google Cloud](https://learn.arm.com/tag/google-cloud), [Oracle](https://learn.arm.com/tag/oracle), [Linux](https://learn.arm.com/tag/linux), [SVE](https://learn.arm.com/tag/sve), [Neon](https://learn.arm.com/tag/neon), [Runbook](https://learn.arm.com/tag/runbook) |

### Who is this for?
This is an introductory topic for database developers, performance engineers, and anyone interested in optimizing data processing workloads on Arm-based cloud instances.

### What will you learn?
Upon completion of this Learning Path, you will be able to:
- Understand bitmap scanning operations in database systems
- Implement bitmap scanning with scalar, Neon, and SVE instructions
- Compare performance between different implementations
- Measure performance improvements on Graviton4 instances

### Prerequisites
Before starting, you will need the following:
- An [Arm-based instance](https://learn.arm.com/learning-paths/servers-and-cloud-computing/csp/) from an appropriate cloud service provider.

### Summary
You’ll implement and benchmark bitmap scanning for database-style workloads on Arm Neoverse V2–based servers, such as AWS Graviton4. First, you’ll build a compact bit vector in C and add baseline and improved scalar scanning routines. Then, you’ll implement Neon and SVE vectorized versions to process data in wider chunks. You’ll use a benchmarking harness that measures each approach so the relative behavior of scalar, Neon, and SVE implementations can be compared on an Arm-based Linux instance. By the end, you’ll run a single C program that exercises all variants and produces timing results suitable for side-by-side evaluation.

### Frequently asked questions
<details>
<summary>Where should I place the code as I follow the steps?</summary>
Use a single source file named `bitvector_scan_benchmark.c`. Add the bit vector type, helper functions, scalar scan routines, Neon and SVE implementations, and the benchmarking code into this file as directed.
</details>

<details>
<summary>What must the bitmap data structure contain before I can add the scan functions?</summary>
The data structure must include a byte array that holds the bits, the physical size in bytes, and the logical size in bits. The same file must also add helpers to generate and analyze test bitmaps.
</details>

<details>
<summary>In what order should I implement and test the scanning approaches?</summary>
Start with the per-bit scalar baseline, then the optimized scalar version, followed by the Neon implementation, and finally SVE. After each addition, run the benchmark to compare against the previous versions.
</details>

<details>
<summary>What result should I expect from the benchmarking step?</summary>
The framework measures elapsed time for each scan function over a chosen number of iterations and tracks how many set-bit positions were found. Use the same input bitmap and iteration count when comparing implementations.
</details>

<details>
<summary>How can I exercise different workload characteristics when benchmarking?</summary>
Use the provided bitmap generation helpers to create datasets with varying densities. Sparse and dense bitmaps highlight different behaviors across the scalar, Neon, and SVE implementations.
</details>
