Async
Benchmarks the time taken for asynchronous data filtering using the AsyncGrid3 class.
This function initializes an AsyncGrid3 instance, performs an asynchronous filter operation on a specific dataset ("NGA_HealthFacilities_v1_72") and state ("abuja"), and prints the time taken for this operation.
Example
await benchmark_async()
Note
The performance results will vary based on the dataset size and system specifications.
Source code in nigeria_geodata/benchmark.py
Sync
Benchmarks the time taken for synchronous data filtering using the Grid3 class.
This function initializes a Grid3 instance, performs a synchronous filter operation on a specific dataset ("NGA_HealthFacilities_v1_72") and state ("abuja"), and prints the time taken for this operation.
Example
benchmark_sync()
Note
The performance results will vary based on the dataset size and system specifications.
Source code in nigeria_geodata/benchmark.py
Results
- sync took 4.58 seconds.
- async took 0.98 seconds.
- machine - MBP 16inch. M3, 36 GB RAM.