Closed jackfong123 closed 2 years ago
Did you compile with optimizations enabled, e.g. -O3
? Hana is fast when I compile this code with optimizations enabled.
Indeed, I get the same here.
Without optimizations: https://wandbox.org/permlink/xB602DZNrycNvLw5 With optimizations: https://wandbox.org/permlink/jEPZHBcnjM1oOMOv
TLDR: enable optimizations or you will get terrible performance out of Hana. Hana totally depends on the compiler's ability to peel off layers of abstractions via inlining.
Hello, I don’t know if my test method is accurate, but the running result seems not match the official description of hana: