Which one has better performance when both Reflect.ownKeys and Object.keys can be used?

in other words, the bottom layer first obtains Reflect.ownKeys , and then excludes inenumerable ones, thus getting the result of Object.keys .

or is there a special acceleration channel for the acquisition of enumerable attributes, while Reflect.ownKeys is slower because it appears late and is not fully optimized?

Mar.03,2022

run in chrome console:

var obj = {};
for(var i=0;i<10000;iPP){obj[i] = i;obj[Symbol(i)] = i;} // add 10000 properties and 10000 symbol properties
// call the method 1000 times
console.time("Reflect.ownKeys");
for(var i=0;i<1000;iPP){
  Reflect.ownKeys(obj);
}
console.timeEnd("Reflect.ownKeys");
// Reflect.ownKeys: 3666.298095703125ms

console.time("Object.getOwnPropertyNames");
for(var i=0;i<1000;iPP){
  Object.getOwnPropertyNames(obj);
}
console.timeEnd("Object.getOwnPropertyNames");
// Object.getOwnPropertyNames: 1003.471923828125ms

but when the symbol attribute is not added, the time consumption is the same

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3b3a8-2c283.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3b3a8-2c283.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?