Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

datom

Package Overview
Dependencies
Maintainers
1
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

datom - npm Package Compare versions

Comparing version 8.0.0 to 8.0.1

pnpm-lock.yaml

6

lib/main.js
(function() {
'use strict';
var CND, Cupofjoe, Datom, MAIN, Multimix, assign, badge, copy, debug, defaults, echo, help, info, isa, jr, p1, p2, rpr, type_of, urge, validate, warn, whisper,
var CND, Cupofjoe, Datom, MAIN, Multimix, assign, badge, debug, defaults, echo, help, info, isa, jr, p1, p2, rpr, type_of, urge, validate, warn, whisper,
indexOf = [].indexOf;

@@ -27,3 +27,3 @@

({assign, copy, jr} = CND);
({assign, jr} = CND);

@@ -158,3 +158,3 @@ //...........................................................................................................

while ((isa.object(R.$)) && (isa.object(R.$.$))) {
R.$ = copy(R.$.$);
R.$ = this.LFT._deep_copy(R.$.$);
}

@@ -161,0 +161,0 @@ return this.freeze(R);

@@ -36,3 +36,3 @@ (function() {

provide_library = function() {
var DATOM, Emittery, L, name, ref, results, value;
var DATOM, Emittery, L, name, ref, results, value, version;
//=========================================================================================================

@@ -42,2 +42,5 @@ /* https://github.com/sindresorhus/emittery */

DATOM = require('..');
if ((version = (require('emittery/package.json')).version) !== '0.6.0') {
throw new Error(`due to changes in https://github.com/sindresorhus/emittery/releases, emittery version is fixed at 0.6.0, got ${version}`);
}
//=========================================================================================================

@@ -44,0 +47,0 @@ // IMPLEMENTATION DETAILS

{
"name": "datom",
"version": "8.0.0",
"version": "8.0.1",
"description": "standardized immutable objects in the spirit of datomic, especially suited for use in data pipelines",

@@ -30,9 +30,9 @@ "main": "lib/main.js",

"dependencies": {
"cnd": "^9.0.0",
"cnd": "^9.2.1",
"cupofjoe": "^0.1.1",
"emittery": "0.6.0",
"intertype": "^7.0.2",
"intertype": "7.6.3",
"letsfreezethat": "^3.0.3",
"multimix": "^4.1.0"
"multimix": "5.0.0"
}
}

@@ -31,2 +31,3 @@

- [Cup Of Datom](#cup-of-datom)
- [Benchmarks](#benchmarks)
- [To Do](#to-do)

@@ -506,3 +507,35 @@

# Benchmarks
Here is a speed comparison ([code on GitHub](https://github.com/loveencounterflow/hengist/tree/master/dev/datom)) between Datom versions 7 and 8, using two methods of dealing with object freezing
and two Datom configurations, `f1` standing for the standard configuration (i.e. either `DATOM = require
'datom'` or `DATOM = ( require 'datom' ).new { freeze: true, }`) and `f0` for the non-freezing configuration
(obtained by `DATOM = ( require 'datom' ).new { freeze: true, }`). `datom_v7_thaw_freeze_f0` is missing here
because of a bug in the `thaw` method used in v7. Each run involved thawing 100 datoms with 5 key/value
pairs each (ex.: `{ '$key': '^vapeurs', '𤭨': 447, '媑': true, escamote: false, auditionnerais: true,
exacerbant: true, }`), changing 3 values and freezing the object again. Tests marked `...thaw_freeze...` use
explicit calls to `d = thaw d; ...; d = freeze d` to do this, the ones marked `...lets...` use a single call
`d = lets d, ( d ) -> ...` to accomplish the same.
We see an overall improvement in the performance of v8 as compared to v7 which can be ascribed to the update
of the [`letsfreezethat`](https://github.com/loveencounterflow/letsfreezethat) dependency which represents a
complete overhaul of that library:
```
datom_v8_thaw_freeze_f0 144,938 Hz 100.0 % │████████████▌│
datom_v8_lets_f0 128,930 Hz 89.0 % │███████████▏ │
datom_v8_thaw_freeze_f1 126,920 Hz 87.6 % │███████████ │
datom_v7_lets_f0 92,669 Hz 63.9 % │████████ │
datom_v8_lets_f1 81,917 Hz 56.5 % │███████▏ │
datom_v7_lets_f1 40,063 Hz 27.6 % │███▌ │
datom_v7_thaw_freeze_f1 39,334 Hz 27.1 % │███▍ │
```
For best performance, it is recommended to
* prefer `d = thaw d; ...; d = freeze d` over `lets()` although the latter is more elegant and prevents
one from forgetting to `freeze()` a `thaw()`ed value, and to
* configure the `DATOM` library to forego actual freezing when moving from development to production, where
appropriate, for a speed gain of around 10%.
# To Do

@@ -509,0 +542,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc