Skip to content

Support running the evaluator component on simdjson #140

@jviotti

Description

@jviotti

This ticket aims to eventually be a master issue for tracking what's needed to support https://github.com/simdjson/simdjson. The idea is to support simdjson on the evaluator, while keeping the compiler JSON Toolkit only.

Phase 1: Abstract away JSON Toolkit

  • Create new header (evaluator_json.h?) that introduces a layer of indirection for type aliases and functions that we can #ifdef based on the chosen backend. All other parts of the evaluator should use this instead. We would even need to abstract how to loop over objects, etc which might get nasty?
  • Revisit number comparison instructions (like AssertionGreaterEqual) to NOT take JSON values as input

Phase 2: Bridge any interoperability requirements between simdjson and JSON Toolkit

  • Integrate simdjson into the build using vendorpull
  • Allow traversing a JSON Toolkit JSON Pointer on a simdjson JSON document. Probably needs to happen here in Blaze as a re-implementation of pointer traversal?
  • Implement an equality check helper between simdjson and JSON Toolkit

Phase 3: Enable simdjson

  • Add a new CMake option for selecting the desired JSON backend for the evaluator with options simdjson and jsontoolkit. Maybe BLAZE_EVALUATOR_BACKEND? Note Blaze would still always link to JSON Toolkit for using other of its stuff, like JSON Pointers
  • Implement a simdjson variant of the common abstraction interface

Resolved

  • Will we emit annotation values using simdjson or JSON Toolkit?
    • Resolution: Annotations are never stored, so we can keep using JSON Toolkit, otherwise we need to get into emitting simdjson from the compiler

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions