Buckets:
ktongue/docker_container / .cache /opencode /node_modules /@fastify /ajv-compiler /benchmark /small-object.mjs
| import cronometro from 'cronometro' | |
| import fjs from 'fast-json-stringify' | |
| import AjvCompiler from '../index.js' | |
| const fjsSerialize = buildFJSSerializerFunction({ | |
| type: 'object', | |
| properties: { | |
| hello: { type: 'string' }, | |
| name: { type: 'string' } | |
| } | |
| }) | |
| const ajvSerialize = buildAJVSerializerFunction({ | |
| properties: { | |
| hello: { type: 'string' }, | |
| name: { type: 'string' } | |
| } | |
| }) | |
| await cronometro({ | |
| 'fast-json-stringify': function () { | |
| fjsSerialize({ hello: 'Ciao', name: 'Manuel' }) | |
| }, | |
| 'ajv serializer': function () { | |
| ajvSerialize({ hello: 'Ciao', name: 'Manuel' }) | |
| } | |
| }) | |
| function buildFJSSerializerFunction (schema) { | |
| return fjs(schema) | |
| } | |
| function buildAJVSerializerFunction (schema) { | |
| const factory = AjvCompiler({ jtdSerializer: true }) | |
| const compiler = factory({}, { customOptions: {} }) | |
| return compiler({ schema }) | |
| } | |
Xet Storage Details
- Size:
- 867 Bytes
- Xet hash:
- 8a1fa53f3779147f74bb2c82ac45b41071fa88b4755865efa27aaedcb091847b
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.