- From: <bugzilla@jessica.w3.org>
- Date: Fri, 03 Jan 2014 08:53:13 +0000
- To: www-international@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=24198
Bug ID: 24198
Summary: The Encoding Standard should use bitwise operations
instead of multiplication, division and exponentiation
when natural
Product: WHATWG
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: minor
Priority: P2
Component: Encoding
Assignee: annevk@annevk.nl
Reporter: hsivonen@hsivonen.fi
QA Contact: sideshowbarker+encodingspec@gmail.com
CC: mike@w3.org, www-international@w3.org
The Encoding Standard systematically avoids specifying bitwise operations and
this leads to contortions like multiplying by 64 raised to the nth power in the
UTF-8 algorithms.
This only serves to obfuscate how the algorithms should actually be
implemented. It would be more useful if the specification used bitwise
operations in cases like this. Even if it might be argued that bitwise
operations are optimizations that don't belong in a spec, UTF-8 in particular
is designed to be implemented using bitwise operations, so the spec's style
amounts to obfuscation and pessimization rather than implementation detail
avoidance.
For encodings other than UTF-8, this editorial style obfuscates whether an
algorithm can be implemented entirely using ALU operations or whether
multiplication or division instructions are actually needed, which is something
that would be nice to see at a glance.
--
You are receiving this mail because:
You are on the CC list for the bug.
Received on Friday, 3 January 2014 08:53:20 UTC