Wide characters support in D
BCS
none at anon.com
Mon Jun 7 22:02:52 PDT 2010
Hello Ruslan,
> --- On Tue, 6/8/10, Jesse Phillips <jessekphillips+D at gmail.com> wrote:
>
>> I think you really need to look more into what templates are and do.
>>
> As I said, for libraries you need to compile
> every commonly used instance, so that user will not be burdened with
> this overhead.
You only need to do that where you are shipping closed source and for that,
it should be trivial to get the compiler to generate all three versions.
>> There is also going to be very little performance gain by
>> using the
>> "system type" for strings. Considering that most of the
>> work is not
>> likely going be to the system commands you mentioned, but
>> within D itself.
>
> It depends. For instance, if you work with files, write on the console
> output, use system functions, use Win32 api, DFL, there can be
> overhead.
Your, right: it depends. In the few cases I can think of where more of the
D code will be interacting with non D code than just processing the text,
you could almost use void[] as your type. Where would you care about the
encoding but not do much worth it?
Also unless you have large amounts of text, you are going to have to work
hard to get perf problems. If you do have large amounts of text, you are
going to be I/O bound (cache misses etc.) and at that point, the cost of
any operation, is it's I/O. From that, Reading in some date, doing a single
pass of processing on it and writing it back out would only take 2/3 long
with translations on both side.
--
... <IXOYE><
More information about the Digitalmars-d
mailing list