Opened 9 years ago

Last modified 9 years ago

#9243 closed Bugs

Subopimal bitwise or (with bytes) — at Version 1

Reported by: Domagoj Šarić Owned by: John Maddock
Milestone: To Be Determined Component: multiprecision
Version: Boost 1.54.0 Severity: Optimization
Keywords: Cc:

Description (last modified by Domagoj Šarić)

I'd expect oring with a byte (or any integral builtin type smaller or equal in size to a static, unchecked, unsigned cpp_int) to produce a single instruction, yet it evaluates to a call to a fairly fat function...

ps. I'm doing number<> big_int; unsigned char const * p_data; while () { big_int |= *p_data++; big_int <<= 8; }

Change History (1)

comment:1 by Domagoj Šarić, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.