Performance

 

The table below shows the comparative time spent on standard operations with various collections instantiated on NCollection and TCollection classes using the data type gp_Pnt. The NCollection classes were used with BaseAllocator, employing just the same memory allocation scheme as in TCollection.

The testing platform: SUN Solaris 2.5.1, UltraSPARC-II 300MHz, 256 MB RAM. The results are shown in seconds, for the given number of repetitive tests:

 

Collection type

Operation

Size x Repetitions

NCollection

TCollection

Array1

creation

4096x4096

2.55

2.32

 

filling

4096x4096

26.77

26.28

 

finding

4096x4096

11.05

11.12

 

operator=

4096x4096

3.26

3.39

 

Assign

4096x4096

5.99

 

Array2

creation

64x64x4096

3.00

2.28

 

filling

64x64x4096

25.39

25.21

 

finding

64x64x4096

19.70

20.05

 

operator=

64x64x4096

3.40

3.84

 

Assign

64x64x4096

6.23

 

List

appending

1024x4096

9.99

11.60

 

operator=

1024x4096

3.62

6.60

 

clearing

1024x4096

1.76

3.97

 

Assign

1024x4096

6.78

 

Queue

pushing

1024x4096

9.52

10.34

 

popping

1024x4096

2.27

4.09

 

operator=

1024x4096

3.77

3.33

 

clearing

1024x4096

1.63

2.82

 

Assign

1024x4096

6.73

 

Stack

pushing

1024x4096

9.31

10.23

 

popping

1024x4096

2.51

3.88

 

operator=

1024x4096

3.79

3.45

 

clearing

1024x4096

1.79

3.71

 

Assign

1024x4096

6.71

 

Set

pushing

256x4096

11.07

27.81

 

finding

256x4096

19.48

53.78

 

operator=

256x4096

0.67

0.83

 

clearing

256x4096

0.47

0.93

 

Assign

256x4096

1.46

 

SList

constructing

1024x4096

24.95

15.11

 

operator=

1024x4096

0.01

0.00

 

Assign

1024x4096

17.82

 

 

clearing

1024x4096

7.40

0.00

Sequence

appending

1024x4096

9.31

10.61

 

finding

1024x4096

20.16

22.81

 

operator=

1024x4096

4.58

3.63

 

clearing

1024x4096

1.81

3.49

 

Assign

1024x4096

7.00

 

Map

adding

1024x4096

9.20

10.17

 

operator=

1024x4096

7.11

7.21

 

finding

1024x4096

4.33

4.42

 

clearing

1024x4096

2.57

3.63

 

Assign

1024x4096

10.52

 

DataMap

binding

1024x4096

16.56

17.50

 

finding

1024x4096

4.66

4.56

 

operator=

1024x4096

8.04

8.88

 

clearing

1024x4096

2.64

4.08

DoubleMap

binding

1024x4096

19.24

20.95

 

finding

1024x4096

7.54

8.01

 

operator=

1024x4096

7.92

9.82

 

clearing

1024x4096

2.27

3.75

IndexedMap

adding

1024x4096

12.06

12.76

 

operator=

1024x4096

6.91

9.26

 

finding

1024x4096

4.33

4.19

 

clearing

1024x4096

2.44

2.44