Parallel JSON parsing on the GPU with compute shaders

birdculture2 pts0 comments

GitHub - friendlymatthew/slurpjson: slurp through json using webgpu compute shaders · GitHub

/" data-turbo-transient="true" />

Skip to content

Search or jump to...

Search code, repositories, users, issues, pull requests...

-->

Search

Clear

Search syntax tips

Provide feedback

--><br>We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Cancel

Submit feedback

Saved searches

Use saved searches to filter your results more quickly

-->

Name

Query

To see all available qualifiers, see our documentation.

Cancel

Create saved search

Sign in

/;ref_cta:Sign up;ref_loc:header logged out"}"<br>Sign up

Appearance settings

Resetting focus

You signed in with another tab or window. Reload to refresh your session.<br>You signed out in another tab or window. Reload to refresh your session.<br>You switched accounts on another tab or window. Reload to refresh your session.

Dismiss alert

{{ message }}

friendlymatthew

slurpjson

Public

Notifications<br>You must be signed in to change notification settings

Fork

Star<br>12

main

BranchesTags

Go to file

CodeOpen more actions menu

Folders and files<br>NameNameLast commit message<br>Last commit date<br>Latest commit

History<br>2 Commits<br>2 Commits

.github/workflows

.github/workflows

src

src

testdata

testdata

.gitignore

.gitignore

Cargo.lock

Cargo.lock

Cargo.toml

Cargo.toml

README.md

README.md

View all files

Repository files navigation

slurpjson

This project parses JSON entirely on the GPU via wgpu compute shaders. The parser decomposes JSON parsing into a pipeline of parallel prefix scans, producing a flat tape of structural characters

This is purely for research into reducing JSON parsing into what Raph Levien calls invitingly parallel problems

Usage

fn main() {<br>let json = r#"<br>"foo": "bar",<br>"baz": {<br>"wef": [1, 2, 3],<br>"yearn": {<br>"1": 2,<br>"2": 3.0<br>"#;

let parser = slurpjson::Parser::try_new()?;<br>let tape = parser.parse_str(&json)?;

let document = slurpjson::Document::new(json.as_bytes(), &tape);

dbg!(document);

Reading

https://raphlinus.github.io/gpu/2020/09/05/stack-monoid.html

https://raphlinus.github.io/personal/2018/05/10/toward-gpu-json-parsing.html

About<br>slurp through json using webgpu compute shaders<br>Resources<br>Readme<br>Activity<br>Stars<br>12 stars<br>Watchers<br>0 watching<br>Forks<br>0 forks<br>Report repository

Releases

Packages

Contributors

Languages

You can’t perform that action at this time.

json github slurpjson search parsing compute

Related Articles