Quantcast
Channel: stardot.org.uk
Viewing all articles
Browse latest Browse all 2385

8-bit acorn software: other • Re: The BBC Micro ROM Library

$
0
0
This may be slightly disingenuous -- I know that Java at least provides a StringBuffer class, which is specifically intended for the purpose of accumulating long strings from fragments in an efficient way. I imagine the other languages probably offer something similar.
The other difference is that C++ and Java are compiled languages so, if you write a long string literal over several lines, expressed as a concatenation, the compiler will do the concatenation at compile time.

But I am sure I read that even in case where the expression cannot be evaluated at compile time, because some of the elements of the concatenation are variables rather than literals, the Java compiler generates calls to the Java StringBuffer class which is clearly more efficient than lots of copies of immutable strings.

On there being a GC bug in chrome, maybe it is not often provoked because the whole JS engine is reset when a new page is loaded so if GC is not happening when it should, no-one would notice.

Statistics: Posted by Coeus — Fri Oct 18, 2024 10:42 pm



Viewing all articles
Browse latest Browse all 2385

Trending Articles