This is not applicable to most cases, but a trivial and instant way of fast deletion is renaming the directory and deleting in the background.
frm () {
now=$(date "+%F-%T-%Z")
for file in "$@"
do
new_name="${file}_${now}"
mv -i $file-- $new_name"$file" "$new_name"
nohup rm -rf $new_name-- "$new_name" > "/tmp/$new_name.loglog" 2>&1 &
done
}
In my case, I often need to recreate node_modules or a repository entirely, and deleting would take forever. I just rename node_modules to deleting_node_modules and run the rm command in the background.
I get to continue with my work right away.