-
Notifications
You must be signed in to change notification settings - Fork 196
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf(las): Bench laz-perf vs laz-rs versions of LasLoader
- Loading branch information
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// loaders.gl | ||
// SPDX-License-Identifier: MIT | ||
// Copyright (c) vis.gl contributors | ||
|
||
import {LAZPerfLoader, LAZRsLoader} from '@loaders.gl/las'; | ||
import {fetchFile, load} from '@loaders.gl/core'; | ||
|
||
const LAZ_URL = '@loaders.gl/las/test/data/indoor.laz'; | ||
// const GEO_PARQUET_URL = '@loaders.gl/parquet/test/data/geoparquet/airports.parquet'; | ||
|
||
export async function lazBench(suite) { | ||
suite.group('ParquetLoader'); | ||
|
||
const response = await fetchFile(LAZ_URL); | ||
const arrayBuffer = await response.arrayBuffer(); | ||
|
||
suite.addAsync('load(LAZPerfLoader) - LAZ load', {multiplier: 40000, unit: 'rows'}, async () => { | ||
await load(arrayBuffer, LAZPerfLoader, {worker: false}); | ||
}); | ||
|
||
suite.addAsync('load(LAZRsLoader) - LAZ load', {multiplier: 40000, unit: 'rows'}, async () => { | ||
await load(arrayBuffer, LAZRsLoader, {worker: false}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters