Hi Tristan, Le 2014-10-22 11:49, tgingold@free.fr a écrit : >> However, bool/shift are also desirable for integers, as I've >> illustrated >> in my last message. Having both would allow the coders to choose the >> type that best suits their needs for each case. > > Can you clarify this point ? I haven't seen in your last message > why this is desirable for integers. Maybe I haven't read the good > last one :-( > > I think your main need for logical operators on integer types is a > speed need. In part, but not only. Booleans can only be partially emulated by arithmetic operators, and it's not just a kludge but it increases the code complexity. A typical example is : how do you code a = b xor 109 (1101101 in binary) or even a = b xor c (a, b and c are integers) without using obfuscating arithmetic expressions or going back and forth with bit_vector or std_ulogic_vector ? > But then, it would be much better to ask vendors to > optimize numeric_bit. After all, they are very close to modular > types. The catch is : we can't ask them. Part of the reason is because so far, when I've spoken about performance, the usuall waiver is "it's up to the tool's writer". The standard can't have "double standards"... So nobody seems to care, in this group and at most vendors. Because "it's not been part of the standard" for decades. Now, introducing a type and operators that they can't possibly mess up (unless they are in bad faith) is an option that is in the realm of what the standard can do and ask for. But this requires an evolution out of the mindset of "boolean operations are only for circuit description". > Tristan. yg -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean.Received on Wed Oct 22 08:58:00 2014
This archive was generated by hypermail 2.1.8 : Wed Oct 22 2014 - 08:58:36 PDT