Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2006-10

difference between variants and simple types

3 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marc Santhoff

Hi,

I'd like to know how the use of simple atomic types like integer and single differs from using variants holding the same types.

How do they compare in speed and memory consumption?

Has anyone done some benchmarking in this area?

TIA,
Marc

Reply by email

Florian Klaempfl
to Marc Santhoff
Show quoted text 6 lines
Hi, I'd like to know how the use of simple atomic types like integer and single differs from using variants holding the same types. How do they compare in speed and memory consumption?

Variants are magnitudes slower.

Reply by email

Marc Santhoff
to Florian Klaempfl
Florian Klaempfl wrote 9 lines
Marc Santhoff schrieb: > Hi, > > I'd like to know how the use of simple atomic types like integer and > single differs from using variants holding the same types. > > How do they compare in speed and memory consumption? Variants are magnitudes slower.

That says enough to stop thinking about variants.

Many thanks,
Marc

Reply by email