From: Bruno H. <br...@cl...> - 2024-11-26 16:02:55
|
Don Cohen wrote: > > array-dimension-limit is for general arrays. > > I didn't realize strings were special in this sense -- You are aware that the string-specific limit is only minimally smaller than the general array-dimension-limit? > are there other special kinds of arrays with limits smaller than > the general case? Possibly bit-vectors; I don't remember. > So one possibility would be to store something other than characters > in the arrays, like char-codes of the characters. I wouldn't recommend that. strings are optimized (vector character); you would quite certainly lose some performance on the way. > > The error message > > *** - string too long: desired length 4194304 exceeds the supported maximum length > > comes from this limit: > > > > #ifdef TYPECODES > > #define stringsize_limit_1 ((uintL)(bit(intLsize-6)-1)) > > #else > > #define stringsize_limit_1 ((uintL)(bit(intLsize-10)-1)) > > #endif > > So TYPECODES must be false. > If it were true then the limit would be 16x higher. > I gather TYPECODES is controlled by some build options? > Impnotes seems to say there are several different ways to > get different combinations including typecodes, but I can't > tell from that which build options are available for this > platform and what other negative (or positive) consequences > would result from each. Correct. Generally you should go with the default for the particular platform. IIRC, there are even platforms where TYPECODES does not work at all. > > The smaller of these limits is 2^22-1, that is, > 4 millions. > > This is a good compromise of space (and thus speed) for functionality. > > What's the difference between ampere and intel that leads to this > difference? TYPECODES vs. not TYPECODES, I would guess? Bruno |