Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
concat vs spread Immutable
(version: 0)
Comparing performance of:
concat vs spread
Created:
3 years ago
by:
Guest
Jump to the latest result
HTML Preparation code:
<script src='https://cdnjs.cloudflare.com/ajax/libs/react/16.3.0/cjs/react.production.min.js'></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/immutable/4.3.0/immutable.min.js"></script>
Tests:
concat
const temp1 = Immutable.fromJS([ { "dispensable": false, "container_type_id": "vendor-tube", "reservable": true, "no_of_units": 1, "indivisible": true, "created_at": "2023-02-21T19:19:35.059-08:00", "name": "Benzylamine (pure)", "reorder_point": null, "resource": { "purity": "99.9", "organization_id": "org3", "compound": { "oxidizer": null, "strong_acid": null, "formula": "C7H10ClN", "exact_molecular_weight": "143.050177", "molecular_weight": "143.62", "general": null, "public_compound_name": "Benzylamine hydrochloride", "morgan_fingerprint": "morgan fingerprint", "unknown": null, "created_at": "2023-02-21T19:19:20.596-08:00", "tpsa": "26.02", "mol": "Cl.NCc1ccccc1", "smiles": "Cl.NCc1ccccc1", "pub_chem_id": null, "peroxide_former": null, "mfcd_number": null, "clogp": "1.5671", "water_reactive_nucleophile": null, "cas_number": "3287-99-8", "sdf": "sdf", "flammable": null, "morgan_fingerprint_bfp": "\\x04800000000400000100010000000000000008000080000000005004000000000000000000000000000002001020000020000000000000000000200000000000", "updated_at": "2023-02-21T19:19:20.596-08:00", "strong_base": null, "id": "15dc23e4-933b-4b6b-8264-1e495ce341e8", "water_reactive_electrophile": null, "inchi": "InChI=1S/C7H9N.ClH/c8-6-7-4-2-1-3-5-7;/h1-5H,6,8H2;1H", "inchi_key": "XKXHCNPAFAXVRZ-UHFFFAOYSA-N" }, "name": "Benzylamine (pure)", "material_components": [ { "material": { "id": "mat1au65zxgaar6jjpq", "name": "Material test" } }, { "material": { "id": "mat1au65zydbkfjsvm6", "name": "Material 3" } }, { "material": { "id": "mat1au65zysa3fs72ef", "name": "Material 6" } }, { "material": { "id": "mat1au65zy84jmtf43z", "name": "Material 2" } } ], "compound_id": "15dc23e4-933b-4b6b-8264-1e495ce341e8", "metadata": { "smiles": null, "molecular_weight": null }, "properties": {}, "kind": "ChemicalStructure", "storage_condition": "cold_20", "id": "rs1au65zq3mktnvrxa", "description": null, "sensitivities": [ "Temperature", "Light" ] }, "provisionable": false, "mass_measurement_unit": "mg", "vol_measurement_unit": null, "mass_per_container": 25.6, "material_component_id": "matc1au65zz7zhhas4af", "maximum_stock": null, "updated_at": "2023-02-21T19:19:35.059-08:00", "container_type": { "id": "vendor-tube", "name": "Vendor tube", "sale_price": "0.0" }, "deleted_at": null, "volume_per_container": 0, "id": "omatc1au65zz9ass8d9g6", "orderable_material_id": "omat1au65zz7e733jdpm" } ]); const temp2 = Immutable.fromJS([ { "dispensable": false, "container_type_id": "vendor-tube", "reservable": true, "no_of_units": 1, "indivisible": true, "created_at": "2023-02-21T19:19:35.059-08:00", "name": "Benzylamine (pure)", "reorder_point": null, "resource": { "purity": "99.9", "organization_id": "org3", "compound": { "oxidizer": null, "strong_acid": null, "formula": "C7H10ClN", "exact_molecular_weight": "143.050177", "molecular_weight": "143.62", "general": null, "public_compound_name": "Benzylamine hydrochloride", "morgan_fingerprint": "morgan fingerprint", "unknown": null, "created_at": "2023-02-21T19:19:20.596-08:00", "tpsa": "26.02", "mol": "Cl.NCc1ccccc1", "smiles": "Cl.NCc1ccccc1", "pub_chem_id": null, "peroxide_former": null, "mfcd_number": null, "clogp": "1.5671", "water_reactive_nucleophile": null, "cas_number": "3287-99-8", "sdf": "sdf", "flammable": null, "morgan_fingerprint_bfp": "\\x04800000000400000100010000000000000008000080000000005004000000000000000000000000000002001020000020000000000000000000200000000000", "updated_at": "2023-02-21T19:19:20.596-08:00", "strong_base": null, "id": "15dc23e4-933b-4b6b-8264-1e495ce341e8", "water_reactive_electrophile": null, "inchi": "InChI=1S/C7H9N.ClH/c8-6-7-4-2-1-3-5-7;/h1-5H,6,8H2;1H", "inchi_key": "XKXHCNPAFAXVRZ-UHFFFAOYSA-N" }, "name": "Benzylamine (pure)", "material_components": [ { "material": { "id": "mat1au65zxgaar6jjpq", "name": "Material test" } }, { "material": { "id": "mat1au65zydbkfjsvm6", "name": "Material 3" } }, { "material": { "id": "mat1au65zysa3fs72ef", "name": "Material 6" } }, { "material": { "id": "mat1au65zy84jmtf43z", "name": "Material 2" } } ], "compound_id": "15dc23e4-933b-4b6b-8264-1e495ce341e8", "metadata": { "smiles": null, "molecular_weight": null }, "properties": {}, "kind": "ChemicalStructure", "storage_condition": "cold_20", "id": "rs1au65zq3mktnvrxa", "description": null, "sensitivities": [ "Temperature", "Light" ] }, "provisionable": false, "mass_measurement_unit": "mg", "vol_measurement_unit": null, "mass_per_container": 25.6, "material_component_id": "matc1au65zz7zhhas4af", "maximum_stock": null, "updated_at": "2023-02-21T19:19:35.059-08:00", "container_type": { "id": "vendor-tube", "name": "Vendor tube", "sale_price": "0.0" }, "deleted_at": null, "volume_per_container": 0, "id": "omatc1au65zz9ass8d9g6", "orderable_material_id": "omat1au65zz7e733jdpm" } ]); return temp1.concat(temp2);
spread
const temp1 = Immutable.fromJS([ { "dispensable": false, "container_type_id": "vendor-tube", "reservable": true, "no_of_units": 1, "indivisible": true, "created_at": "2023-02-21T19:19:35.059-08:00", "name": "Benzylamine (pure)", "reorder_point": null, "resource": { "purity": "99.9", "organization_id": "org3", "compound": { "oxidizer": null, "strong_acid": null, "formula": "C7H10ClN", "exact_molecular_weight": "143.050177", "molecular_weight": "143.62", "general": null, "public_compound_name": "Benzylamine hydrochloride", "morgan_fingerprint": "morgan fingerprint", "unknown": null, "created_at": "2023-02-21T19:19:20.596-08:00", "tpsa": "26.02", "mol": "Cl.NCc1ccccc1", "smiles": "Cl.NCc1ccccc1", "pub_chem_id": null, "peroxide_former": null, "mfcd_number": null, "clogp": "1.5671", "water_reactive_nucleophile": null, "cas_number": "3287-99-8", "sdf": "sdf", "flammable": null, "morgan_fingerprint_bfp": "\\x04800000000400000100010000000000000008000080000000005004000000000000000000000000000002001020000020000000000000000000200000000000", "updated_at": "2023-02-21T19:19:20.596-08:00", "strong_base": null, "id": "15dc23e4-933b-4b6b-8264-1e495ce341e8", "water_reactive_electrophile": null, "inchi": "InChI=1S/C7H9N.ClH/c8-6-7-4-2-1-3-5-7;/h1-5H,6,8H2;1H", "inchi_key": "XKXHCNPAFAXVRZ-UHFFFAOYSA-N" }, "name": "Benzylamine (pure)", "material_components": [ { "material": { "id": "mat1au65zxgaar6jjpq", "name": "Material test" } }, { "material": { "id": "mat1au65zydbkfjsvm6", "name": "Material 3" } }, { "material": { "id": "mat1au65zysa3fs72ef", "name": "Material 6" } }, { "material": { "id": "mat1au65zy84jmtf43z", "name": "Material 2" } } ], "compound_id": "15dc23e4-933b-4b6b-8264-1e495ce341e8", "metadata": { "smiles": null, "molecular_weight": null }, "properties": {}, "kind": "ChemicalStructure", "storage_condition": "cold_20", "id": "rs1au65zq3mktnvrxa", "description": null, "sensitivities": [ "Temperature", "Light" ] }, "provisionable": false, "mass_measurement_unit": "mg", "vol_measurement_unit": null, "mass_per_container": 25.6, "material_component_id": "matc1au65zz7zhhas4af", "maximum_stock": null, "updated_at": "2023-02-21T19:19:35.059-08:00", "container_type": { "id": "vendor-tube", "name": "Vendor tube", "sale_price": "0.0" }, "deleted_at": null, "volume_per_container": 0, "id": "omatc1au65zz9ass8d9g6", "orderable_material_id": "omat1au65zz7e733jdpm" } ]); const temp2 = Immutable.fromJS([ { "dispensable": false, "container_type_id": "vendor-tube", "reservable": true, "no_of_units": 1, "indivisible": true, "created_at": "2023-02-21T19:19:35.059-08:00", "name": "Benzylamine (pure)", "reorder_point": null, "resource": { "purity": "99.9", "organization_id": "org3", "compound": { "oxidizer": null, "strong_acid": null, "formula": "C7H10ClN", "exact_molecular_weight": "143.050177", "molecular_weight": "143.62", "general": null, "public_compound_name": "Benzylamine hydrochloride", "morgan_fingerprint": "morgan fingerprint", "unknown": null, "created_at": "2023-02-21T19:19:20.596-08:00", "tpsa": "26.02", "mol": "Cl.NCc1ccccc1", "smiles": "Cl.NCc1ccccc1", "pub_chem_id": null, "peroxide_former": null, "mfcd_number": null, "clogp": "1.5671", "water_reactive_nucleophile": null, "cas_number": "3287-99-8", "sdf": "sdf", "flammable": null, "morgan_fingerprint_bfp": "\\x04800000000400000100010000000000000008000080000000005004000000000000000000000000000002001020000020000000000000000000200000000000", "updated_at": "2023-02-21T19:19:20.596-08:00", "strong_base": null, "id": "15dc23e4-933b-4b6b-8264-1e495ce341e8", "water_reactive_electrophile": null, "inchi": "InChI=1S/C7H9N.ClH/c8-6-7-4-2-1-3-5-7;/h1-5H,6,8H2;1H", "inchi_key": "XKXHCNPAFAXVRZ-UHFFFAOYSA-N" }, "name": "Benzylamine (pure)", "material_components": [ { "material": { "id": "mat1au65zxgaar6jjpq", "name": "Material test" } }, { "material": { "id": "mat1au65zydbkfjsvm6", "name": "Material 3" } }, { "material": { "id": "mat1au65zysa3fs72ef", "name": "Material 6" } }, { "material": { "id": "mat1au65zy84jmtf43z", "name": "Material 2" } } ], "compound_id": "15dc23e4-933b-4b6b-8264-1e495ce341e8", "metadata": { "smiles": null, "molecular_weight": null }, "properties": {}, "kind": "ChemicalStructure", "storage_condition": "cold_20", "id": "rs1au65zq3mktnvrxa", "description": null, "sensitivities": [ "Temperature", "Light" ] }, "provisionable": false, "mass_measurement_unit": "mg", "vol_measurement_unit": null, "mass_per_container": 25.6, "material_component_id": "matc1au65zz7zhhas4af", "maximum_stock": null, "updated_at": "2023-02-21T19:19:35.059-08:00", "container_type": { "id": "vendor-tube", "name": "Vendor tube", "sale_price": "0.0" }, "deleted_at": null, "volume_per_container": 0, "id": "omatc1au65zz9ass8d9g6", "orderable_material_id": "omat1au65zz7e733jdpm" } ]); return Immutable.fromJS([...temp1, ...temp2]);
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
concat
spread
Fastest:
N/A
Slowest:
N/A
Latest run results:
No previous run results
This benchmark does not have any results yet. Be the first one
to run it!
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
It looks like you've provided two JSON strings, one for a response to an API request and another for benchmarking results. To answer your question, I'll assume you want me to process the first JSON string: ```json { "status": "ok", "message": null, "data": { "id": "rs1au65zq3mktnvrxa", "name": "Benzylamine (pure)", "material_components": [...], ... }, "provisionable": false, "mass_measurement_unit": "mg", "vol_measurement_unit": null, "mass_per_container": 25.6, "material_component_id": "matc1au65zz7zhhas4af", "maximum_stock": null, "updated_at": "2023-02-21T19:19:35.059-08:00", "container_type": { ... }, "deleted_at": null, "volume_per_container": 0, "id": "omatc1au65zz9ass8d9g6", "orderable_material_id": "omat1au65zz7e733jdpm" } ``` The JSON object appears to be a material record with various attributes, such as its ID, name, and quantity per container. The `material_components` field contains an array of individual components that make up the material. Is there anything specific you'd like me to extract or process from this data?
Related benchmarks:
object spread vs immutable-js set vs object mutate
object spread vs immutable-js set (large)
Spread operator vs Immutable.js performance for common use cases
object spread vs immutable-js map, larger
Comments
Confirm delete:
Do you really want to delete benchmark?