[fpc-pascal] Set size limit

Howard Page-Clark hdpc at talktalk.net
Sun Mar 10 15:45:44 CET 2013


On 10/03/13 2:12, Jonas Maebe wrote:

> There is a already a test for larger set support: http://svn.freepascal.org/svn/fpc/trunk/tests/test/tset6.pp
>
> Nobody has worked yet on implementing it, but if anyone thinks it's easy to do, please go ahead. For larger sets,
  especially if they are sparse, a simple hashtable-based class would 
probably be much faster and memory efficient
  than simply extending the default implementation though. With operator 
overloading and generics you might even be
  able to use more or less the same syntax as with built-in sets.

There is a generic hashset implementation in the stl package, which has 
no 256-element limit on set size. See
...\source\packages\fcl-stl\src\ghashset.pp
A .tex documentation file is included along with a hashsetexample.pp

Howard




More information about the fpc-pascal mailing list