-
Notifications
You must be signed in to change notification settings - Fork 142
feat!: parameter object is null object #333
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
tests fail because of tap issues... |
climba03003
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cleaner and Simpler
new Function('paramsArray', `return { __proto__:null,${lines.join(',')}}`)|
Need to benchmark. |
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this shoukd be a semver-major change.
|
It seems that new NullObject is faster than using proto trick node benchmark/null-object.js
new NullObject() x 1,377,691,231 ops/sec ±0.11% (194 runs sampled)
{__proto__: null } x 33,097,458 ops/sec ±0.50% (185 runs sampled)'use strict'
const { NullObject } = require('../lib/null-object')
const Benchmark = require('benchmark')
Benchmark.options.minSamples = 100
const suite = Benchmark.Suite()
suite.add(`new NullObject()`, function () {
const result = new NullObject()
})
suite.add(`{__proto__: null }`, function () {
const result = {__proto__: null }
})
suite
.on('cycle', function (event) {
console.log(String(event.target))
})
.on('complete', function () {
})
.run() |
|
Can you exclude windows v14 from CI? |
|
@mcollina done. I would like to write another benchmark for the actual parameter generation. So please dont merge to fast. I posted my benchmark to discuss if proto is the right way or not. |
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm looks nice!
|
PTAL @ivan-tymoshenko |
ivan-tymoshenko
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
|
@Uzlopak Can you post the bechmarks comparison pls? |
|
can you merge main? |
|
@mcollina done |
climba03003
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We all missed this one.
cc @mcollina
mcollina
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Eomm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
I have no power here - @Uzlopak could you edit the title with feat!: ... to stand out the breaking?
|
Donr |
see fastify/fastify#4357
@Eomm
@mcollina
@jsumners
I did not bench