well, my question is: what is the api that runs in C
does roblox api run in C, such as Instance:FindFirstChild or Instance:Destroy(), or only the lua api does run in C?
I want to know this so I can realize does it worth to make my own custom functions
e.g. Instance:FindFirstChildOfClassAndName – a function I wanted to make since a while
or just the normal roblox api is way faster & performant – C code runs faster than lua code
as if the roblox api runs in luau then I should be able to create my custom function that helps me without losing performance.
It doesn’t matter if luau runs in c or not. That function doesn’t exist, so you still have to implement it yourself.
Also I believe both languages (if compiled) are the same speed, that’s why big o notation exist, They focus on algorithms rather than languages.
The only reason why luau is slower in this case is because it is interpreted and not compiled.
Also @native exists. Also the performance lost is probably negligible.
Lastly I don’t know if it runs on c or not, it might be cpp.
yes i know that but i wanted to ask so that some functions won’t be worth it to make if they’ll run slower than the normal api, thank u for the response!
manually probably, also note that this is just an example but i don’t need this function now, i already know how to make it
but i wanted to know if it’ll be faster than the normal api or slower by much
I see, well I agree with the fact that, so far Luau is quite fast, and I absolutely think that the difference in terms of time execution would be absolutely negligible ! I don’t think you have millions of children to check, the server would lag out before reaching this specific amount
so the difference between the roblox api and my custom functions won’e be that huge, and i can use @native if i wanted to boost the performance a bit
alright that makes sense, thank u!