Could we get #[defun] to be able to take parameters to annotate for 'pure and 'side-effect-free ? This can help the byte-compiler to make some optimizations. So something like:
#[defun(pure = true, side_effect_free = true)]
fn my_json_parsing(str: String) -> ... {
...
}
https://www.gnu.org/software/emacs/manual/html_node/elisp/Standard-Properties.html#index-pure-property