diff --git a/port/js/benchmarks/fromEntries.benchmark.js b/port/js/benchmarks/fromEntries.benchmark.js index b2aab11..ee44681 100644 --- a/port/js/benchmarks/fromEntries.benchmark.js +++ b/port/js/benchmarks/fromEntries.benchmark.js @@ -19,7 +19,18 @@ let srcStruct = new Struct({ { name: 'type_Uint64', type: 'Uint64' }, { name: 'type_String', type: 'String' }, { name: 'type_Double', type: 'Double' }, - { name: 'type_Char', type: 'Char' } + { name: 'type_Char', type: 'Char' }, + { name: '_type_Int8', type: 'Int8' }, + { name: '_type_Uint8', type: 'Uint8' }, + { name: '_type_Int16', type: 'Int16' }, + { name: '_type_Uint16', type: 'Uint16' }, + { name: '_type_Int32', type: 'Int32' }, + { name: '_type_Uint32', type: 'Uint32' }, + { name: '_type_Int64', type: 'Int64' }, + { name: '_type_Uint64', type: 'Uint64' }, + { name: '_type_String', type: 'String' }, + { name: '_type_Double', type: 'Double' }, + { name: '_type_Char', type: 'Char' } ] }); @@ -34,14 +45,25 @@ let srcData = { type_Uint64: BigInt(8), type_String: 'This is test string', type_Double: -Math.PI, - type_Char: 'A' + type_Char: 'A', + _type_Int8: 8, + _type_Uint8: 8, + _type_Int16: 8, + _type_Uint16: 8, + _type_Int32: 8, + _type_Uint32: 8, + _type_Int64: BigInt(8), + _type_Uint64: BigInt(8), + _type_String: 'This is test string', + _type_Double: -Math.PI, + _type_Char: 'A' }; srcData.__SIZE__ = Buffer.calcSize(Buffer.createValueArray(srcStruct.fields, srcData)); let b = Buffer.serializeObj(srcStruct.schema.fields, srcData); -describe('Object.fromEntries vs mutation Object ', () => { +describe('Buffer(b).deserialize ', () => { beforeEach(() => { srcData = {