From 3b410cf30aa6849b680af3492eb0651fcf68dd92 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Wed, 22 May 2024 04:41:22 +0200 Subject: [PATCH] Fix bad regex replace in latest post --- .../2024-05-10-fast-shallow-array-cloning-in-javascript.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_posts/2024/2024-05-10-fast-shallow-array-cloning-in-javascript/2024-05-10-fast-shallow-array-cloning-in-javascript.html b/_posts/2024/2024-05-10-fast-shallow-array-cloning-in-javascript/2024-05-10-fast-shallow-array-cloning-in-javascript.html index c0dadc8..67e1b92 100644 --- a/_posts/2024/2024-05-10-fast-shallow-array-cloning-in-javascript/2024-05-10-fast-shallow-array-cloning-in-javascript.html +++ b/_posts/2024/2024-05-10-fast-shallow-array-cloning-in-javascript/2024-05-10-fast-shallow-array-cloning-in-javascript.html @@ -6,7 +6,7 @@ tags: ["JavaScript", "Array", "Shallow-Clone", "Clone", "Duplicate", "ECMAScript

The Discord Servers I'm a moderator in have a bit of a spam bot problem lately, where bots join that never interact and only spam user's DMs. While I could wait until Discord bans them, it's not exactly the best solution, so why not build my own bot to handle users that never interact? So I started building a bot using NodeJS and discord.js. It's been going great so far, but then my ADHD got the better of me when I wanted to know: What actually is the fastest way to clone an Array?

-

Searching for an answer, I stumbled on this StackOverflow question. And as usual, almost all of the answers are simply regurgitated content with nothing to back it up. So with nothing else to do on a weekend, I threw my entire knowlEdge 124.0.2478.97 at the problem, wrote a benchmarking "tool", wrote several ways to do the same, and I think I found it.

+

Searching for an answer, I stumbled on this StackOverflow question. And as usual, almost all of the answers are simply regurgitated content with nothing to back it up. So with nothing else to do on a weekend, I threw my entire knowledge at the problem, wrote a benchmarking "tool", wrote several ways to do the same, and I think I found it.

Coding a Benchmark