Re: [Factor-talk] Iterating over arrays and string

2013-01-19 Thread Joe Groff
On Sat, Jan 19, 2013 at 5:35 PM, Jon Harper wrote: > Here are my questions: > 1) in bar1, "" like is enough to allow the compiler to infer type and > generate code using string-nth-fast and set-string-nth-fast instead of > nth-unsafe and set-nth-unsafe (just like using TYPED: in bar2); However, i

[Factor-talk] Iterating over arrays and string

2013-01-19 Thread Jon Harper
Hi list, after some experiments, I was surprised with how the optimizing compiler could infer types. Not sure if all those behaviors are expected.. If anyone has some explanations, that would be great. Please see this paste for code: https://paste.factorcode.org/paste?id=2836 Here are my questions