From 1cee9c6ea2b4f092355d2a1bc59e995c872e9e66 Mon Sep 17 00:00:00 2001 From: Nigel Tao Date: Fri, 10 Nov 2017 09:56:27 +1100 Subject: [PATCH] Add note to consider a read_u8_fast method. --- lang/check/optimize.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lang/check/optimize.go b/lang/check/optimize.go index 1a82565a..4b8026da 100644 --- a/lang/check/optimize.go +++ b/lang/check/optimize.go @@ -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"