Add note to consider a read_u8_fast method.

This commit is contained in:
Nigel Tao committed 2017-11-10 09:56:27 +11:00
1 parent 417ecef784
commit 1cee9c6ea2
1 file changed
+9
+9
View File
@@ -14,6 +14,15 @@
package check
// TODO: should bounds checking even be responsible for selecting between
// optimized implementations of e.g. read_u8? Instead, the Puffs code could
// explicitly call either read_u8 or read_u8_fast, with the latter having
// stronger preconditions.
//
// Doing so might need some syntactical distinction (not just a question mark)
// between "foo?" and "bar?" if one of those methods can still return an error
// code but never actually suspend.
import (
"fmt"
"math/big"