Added TODO

This commit is contained in:
Justin Ethier 2017-10-23 17:10:43 +00:00
parent 114e284566
commit 424592ad8b

View file

@ -2121,6 +2121,8 @@ object Cyc_string_ref(void *data, object str, object k)
Cyc_rt_raise2(data, "string-ref - invalid index", k); Cyc_rt_raise2(data, "string-ref - invalid index", k);
} }
TODO: we can take the fast path if num_cp == len, since that implies all chars are just 1 byte.
would be the case for all string functions that need to be updated to be (possibly) O(n)
{ {
char_type codepoint; char_type codepoint;
uint32_t state = 0; uint32_t state = 0;