compile time optimisations #1511
Replies: 4 comments 25 replies
-
Beta Was this translation helpful? Give feedback.
-
Wow! Yeah, because these are known types, I can probably also make a pseudo-span that isn't templated. But, I'd first go for a pointer and size like you suggested. Feel free to make pull requests for these changes, but I'll also try to do some -ftime-trace optimizations when I'm able. |
Beta Was this translation helpful? Give feedback.
-
I was actually talking about template instantiations and not initialization with
I would say make includes:
Excellent point. |
Beta Was this translation helpful? Give feedback.
-
@arturbac |
Beta Was this translation helpful? Give feedback.
-
from discussion on issue #1501
here from example_json
Largest times from instantations (relative to top wall time)
Write insantations
cpp glz::write_json<BasicStruct &, std::basic_string<char> &>
Wall Duration 33,266 ms
cpp glz::reflect<BasicStruct>
cpp glz::for_each_short_circuit<4UL, (lambda at /home/artur/projects/glaze/include/glaze/core/reflect.hpp:316:39)>
cpp "glz::detail::invoke_table<4UL, (lambda at /home/artur/projects/glaze/include/glaze/json/write.hpp:1571:35)>"
Read instantations
cpp glz::read_json<BasicStruct, std::basic_string<char> &>
Wall Duration 66,972 ms
cpp glz::detail::front_bytes_hash_info<unsigned short, 4UL>
cpp glz::detail::unique_per_length_info<std::array<std::basic_string_view<char>, 4>>
cpp glz::detail::decode_index<opts{...}, BasicStruct, 1UL, BasicStruct &, glz::context &, const char *&, const char *&>
where functions front_bytes_hash_info, unique_per_length_info are called for glz::detail::make_keys_info<4UL> which takes 45,007 ms of wall time
Beta Was this translation helpful? Give feedback.
All reactions