> In tracking down a gc bug, I realized that the current throwaway > implementation of the print op could be replaced with a faster > throwaway implementation that avoids doing a string_to_cstring. > > Note that both the original and new implementations are still buggy > with respect to supporting different encodings. I don't know if > printf("%s") is any better than fwrite in terms of at least vaguely > paying attention to your locale or whatever. If so, don't apply it. > > (all tests pass)
Yay, I like this one. I was looking for a way to get rid of string_to_cstring at one point due to its ugly habit of uncowifying strings when we go to print them. I tried a temporary solution that used parrot io, which worked, except that the rest of the print ops in parrot still used stdio, and so I ended up with out-of-order printing. I'll apply this once Parrot 009 starts up again. Although at some point, we should go 100% in converting the IO in core.ops to use parrot io, or convert the tests/programs over to using io.ops. (Not sure which way we want to go.) Mike Lambert