You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
36 lines
988 B
36 lines
988 B
// | ------------------------------------------------------------
|
|
// | @版本: version 0.1
|
|
// | @创建人: 【Nie-x7129】
|
|
// | @E-mail: x71291@outlook.com
|
|
// | @所在项目: graphResource2
|
|
// | @文件描述: testClassExtents.js -
|
|
// | @创建时间: 2023-12-03 17:58
|
|
// | @更新时间: 2023-12-03 17:58
|
|
// | @修改记录:
|
|
// | -*-*-*- (时间--修改人--修改说明) -*-*-*-
|
|
// | =
|
|
// | ------------------------------------------------------------
|
|
console.log('START')
|
|
console.time(1)
|
|
let list = []
|
|
|
|
const a1 = performance.now();
|
|
for(let i = 0; i < 100000000; i ++){
|
|
list.push({
|
|
name: '何希',
|
|
age: 35,
|
|
love: 'GY',
|
|
key: parseInt(Math.random() * 100000000)
|
|
})
|
|
}
|
|
console.log('A')
|
|
const a2 = performance.now();
|
|
const data = list.filter(i => {
|
|
return (i.name + i.love + i.key).includes('GY21')
|
|
})
|
|
const a3 = performance.now();
|
|
|
|
console.log('makeData', a2-a1)
|
|
console.log('filterData', a3-a2)
|
|
console.log(data.length)
|
|
console.timeEnd(1)
|
|
|