> On May 4, 2015, at 7:56 AM, Tamas Papp <[email protected]> wrote: > > On Mon, May 04 2015, Scott Jones <[email protected]> wrote: > >>> On May 4, 2015, at 3:21 AM, Tamas Papp <[email protected]> wrote: >>> >>> I think you misunderstand: IOBuffer is suggested not for mutable string >>> operations in general, but only for efficient concatenation of many >>> strings. >>> >>> Best, >>> >>> Tamas >> >> I don’t think that I misunderstood - it’s that using IOBuffer is the only >> solution that has been given here… and it doesn’t handle what I need to do >> efficiently... >> If you have a better solution, please let me know… > > 1. Can you share the benchmarks (and simplified, self-contained code) > for your problem using IOBuffer? I have always found it very fast, but > maybe what you are working on is different.
It is very fast, for building up things in a buffer… the problem isn’t the speed of IOBuffer, it’s that you can’t do string operations on it (AFAIK), without going back and forth converting it to a immutable string… The other issue is not computer efficiency, but programmer efficiency… The syntax is clumsy, compared to doing something like: `MyBuff ..= “.ext”` I’m a firm believer that most of the time, programmer efficiency is more important than computer efficiency… (For the most part, I think Julia is incredibly good in that aspect, with the powerful metaprogramming and the way with parameterization it can generate a lot of special case code for me, saving me a lot of time, while producing code that is as fast as my hand specialized and optimized C code) > 2. Do you have a specific algorithm in mind that would be more > efficient? No, just many years of experience trying to speed up the compiler / interpreter of a language used heavily for string / database processing… I never wrote application code, just had customer requests for certain types of operations to be made faster… > Best, > > Tamas Thanks for all the responses… It helps a Julia beginner like me a lot! Scott
