[fpc-pascal] ShortString still relevant today?

Hairy Pixels genericptr at gmail.com
Tue Jul 4 03:19:02 CEST 2023

I've been exploring the string types and I'm curious now, does the classic Pascal "ShortString" even make sense anymore on modern computers? I'm running tests and I can't seem to find a way in which AnsiString overall performs worse than ShortString. 

Are there any examples where AnsiString is worse? I think if you passed strings around lots that would trigger the ref counting and InterlockedExchange (I saw this in my own code before and it unnerved me) but that's been hard to test.

	Ryan Joseph

More information about the fpc-pascal mailing list