Toggle navigation
MeasureThat.net
Create a benchmark
Tools
Feedback
FAQ
Register
Log In
Fly Json ODM - 1.21.0
(version: 0)
Benchmark using Fly Json ODM in browser for 1million array objects.
Comparing performance of:
SET + WHERE vs SET + WHERE (Shallow Mode)
Created:
2 years ago
by:
Registered User
Jump to the latest result
HTML Preparation code:
<script src="https://cdn.jsdelivr.net/npm/fly-json-odm@1.21.0/dist/flyjson.min.js"></script>
Script Preparation code:
var nosql = new FlyJson(); var data = []; var start = 1; var end = 1000000; for(var i =start;i<=end;i++) { data.push({ id:i, name:'user_'+i }); }
Tests:
SET + WHERE
var result = nosql.set(data).where('id',1000000).exec();
SET + WHERE (Shallow Mode)
var result = nosql.setMode('shallow').set(data).where('id',1000000).exec();
Rendered benchmark preparation results:
Suite status:
<idle, ready to run>
Run tests (2)
Previous results
Fork
Test case name
Result
SET + WHERE
SET + WHERE (Shallow Mode)
Fastest:
N/A
Slowest:
N/A
Latest run results:
Run details:
(Test run date:
one year ago
)
User agent:
Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/130.0.0.0 Safari/537.36
Browser/OS:
Chrome 130 on Linux
View result in a separate tab
Embed
Embed Benchmark Result
Test name
Executions per second
SET + WHERE
1.0 Ops/sec
SET + WHERE (Shallow Mode)
6.1 Ops/sec
Autogenerated LLM Summary
(model
llama3.2:3b
, generated one year ago):
Let's break down the provided JSON and explain what's being tested. **Overview** The provided JSON represents two benchmark test cases for measuring the performance of Fly Json ODM (Object Data Modeling) in a browser environment. The benchmarks compare the execution speed of different approaches for setting data and filtering it using the `where` method. **Benchmark Definition** The first section describes the overall benchmark setup: * `Name`: The name of the benchmark, which is "Fly Json ODM - 1.21.0". * `Description`: A brief description of the benchmark. * `Script Preparation Code`: This code initializes a new instance of `FlyJson` and creates an array `data` with 1 million objects. * `Html Preparation Code`: This code includes the JavaScript library for Fly Json ODM, version 1.21.0. **Individual Test Cases** The second section describes two individual test cases: 1. **"SET + WHERE"`** * The benchmark definition is: `var result = nosql.set(data).where('id',1000000).exec();` * This test case sets the data using the `set` method and then filters it using the `where` method with a condition on the `id` field. 2. **"SET + WHERE (Shallow Mode)"** (also known as "Shallow Mode") * The benchmark definition is: `var result = nosql.setMode('shallow').set(data).where('id',1000000).exec();` * This test case sets the data using the `set` method in shallow mode, which is a special configuration that allows for faster performance at the cost of some additional complexity. **Pros and Cons** The two approaches have different trade-offs: 1. **"SET + WHERE"`** + Pros: - Easier to understand and maintain. - Does not require any special configurations or optimizations. - Cons: - Might be slower due to the overhead of recursive filtering. 2. **"SET + WHERE (Shallow Mode)"** (also known as "Shallow Mode") + Pros: - Can provide faster performance by reducing the overhead of recursive filtering. - Is optimized for specific use cases where shallow mode is suitable. - Cons: - Requires special configuration and understanding to set up correctly. - Might be more complex to maintain and debug. **Library and Syntax** Fly Json ODM is a JavaScript library that provides an object data modeling (ODM) framework for storing and querying data in the browser. The `set` method is used to store data, while the `where` method is used to filter data based on specific conditions. Shallow mode is a special configuration option that allows for faster performance by reducing the overhead of recursive filtering. **Special JS Feature or Syntax** There are no special JavaScript features or syntaxes mentioned in this benchmark setup. The focus is on the performance comparison between two different approaches using standard JavaScript constructs. **Other Alternatives** If you're looking for alternative ODM frameworks or libraries, some popular options include: * MongoDB Node.js Driver * Couchbase Lite * PouchDB * GraphQL However, Fly Json ODM is a specialized library designed specifically for browser-based applications and may not be as widely adopted or supported as more general-purpose ODM solutions.
Related benchmarks:
Fly Json ODM - 1.16.0
Fly Json ODM - 1.18.2 - Medium Size
Fly Json ODM - 1.19.0 - Full
Fly Json ODM - 1.21.0 - Medium Size
Comments
Confirm delete:
Do you really want to delete benchmark?