Is it good to use set to remove duplicates from arrays in javascript? What kind of data structures are used by the underlying implementation of set in js (excluding array nesting)

let set= new Set (needDealWitharray);
let resArray=Array.from (set); / / Array conversion completed

Aug.24,2021

personal experience, nothing. Es6 native methods, the impact on the performance is basically negligible


since the native support for set, naturally want you to use it, performance issues are not what you need to consider.


engines are already V8, which can basically be ignored.

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-1eb3eab-48266.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-1eb3eab-48266.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?