Currently I'm writting a small program with an optional feature, gpu
The program output a string like println!("process ({type}) finished with {code} after {time}",type = ..., code = ..., time = now.elapsed())
, where the type is using GPU
with gpu
feature and isolated only
without that feature.
I checked the output binaries, all the process (
, ) finished with
and the type are stored in different locations, which means a runtime concat will be performed.
That might be fine since I only call such println once, but I'm still curious about perform a const evaluation in this step. Is it possible to perform such const evaluation?
I know an ugly trait is that, store code and time manually, then write two different println!
statements with or without feature gpu
, but is it possible not to repeat the println!
macro twice?