▲ | ozgrakkurt 5 days ago | |||||||||||||||||||||||||
It is very easy to specialise a function in zig, you just put if(T == u8) or something like that inside the function and do w/e in there | ||||||||||||||||||||||||||
▲ | unwind 5 days ago | parent [-] | |||||||||||||||||||||||||
Can the compiler detect that and use the proper code so no test is needed at runtime? This is Zig so I guess the answer is "yeah, duh" but wanted to ask since it sounded like the solution is less, uh, "compiler-friendly" than I would expect. | ||||||||||||||||||||||||||
|