regexman
(reg)
December 4, 2021, 2:51pm
#1
its so fast, that its unstable for while true do and will still crash
GOOD TIME TO USE IT:
perlin noise, unless its a huge map or somethin
BAD TIME TO USE IT:
while true do and repeat etc.
i use it for my perlin noise map generator
How to use it:
local module = require(pathtomodule)
module:veryFastWait(number)
where to place it:
you can place it in replicatedstorage if youre gonna use it in the client, else you can put it in serverscriptservice
and a poll, should i put it in #resources:community-resources ?
do you find this useful?
the speed of it is
--0.28954235821+e
1 Like
KdudeDev
(Kdude)
December 4, 2021, 3:03pm
#2
You should measure the speed of it before asking for feedback, just to see how much different it is from task.wait() (1/60th of a second)
3 Likes
regexman
(reg)
December 4, 2021, 3:04pm
#3
when i measured it,
its like
--0.28954235821+e
Lightlimn
(Lightlimn)
December 4, 2021, 5:12pm
#4
Could you show us how you measured it? Because realistically that isn’t feasible.
regexman
(reg)
December 4, 2021, 5:13pm
#5
i just used tick
local start = tick()
module:veryFastWait()
print(tick() - start)
Lightlimn
(Lightlimn)
December 4, 2021, 5:15pm
#6
I just looked at the module and while it sort of does ‘wait’, it’s still doing a lot of processing in that time and I really don’t think it should be used for stuff like terrain generation or really anything else since it’s just adding unnecessary processing to your code, since it’s just loops of 3 of these:
game:FindFirstChildWhichIsA("Workspace")
It’s not crashing in a while loop because it’s so fast, but because you’re not actually waiting and you’re just doing extra work.
1 Like
regexman
(reg)
December 4, 2021, 5:17pm
#7
it does, just a lighter one than
while true do end
the reason it findfirstchilds is findfirstchild is slower than the dot operator which means it does some delay, so i put 3 findfirstchilds
Lightlimn
(Lightlimn)
December 4, 2021, 5:18pm
#8
This is probably not very good for performance.
3 Likes
I use nano-wait sometimes.
while true do break end
1 Like
how long does this yield the thread?