 |
Changeset 3867
- Timestamp:
- 08/09/08 17:13:12
(4 months ago)
- Author:
- kris
- Message:
fixes #1232 :: opIn_r for SortedMap?
thanks to keinfarbton
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r3713 |
r3867 |
|
| 51 | 51 | bool opIndexAssign (V element, K key) |
|---|
| 52 | 52 | V opIndex (K key) |
|---|
| 53 | | V* opIn (K key) |
|---|
| | 53 | V* opIn_r (K key) |
|---|
| 54 | 54 | |
|---|
| 55 | 55 | uint size () |
|---|
| … | … | |
| 315 | 315 | ***********************************************************************/ |
|---|
| 316 | 316 | |
|---|
| 317 | | final V* opIn (K key) |
|---|
| | 317 | final V* opIn_r (K key) |
|---|
| 318 | 318 | { |
|---|
| 319 | 319 | if (count) |
|---|
| … | … | |
| 513 | 513 | final V opIndex (K key) |
|---|
| 514 | 514 | { |
|---|
| 515 | | auto p = opIn (key); |
|---|
| | 515 | auto p = opIn_r (key); |
|---|
| 516 | 516 | if (p) |
|---|
| 517 | 517 | return *p; |
|---|
| … | … | |
| 922 | 922 | { |
|---|
| 923 | 923 | import tango.io.Stdout; |
|---|
| 924 | | import tango.math.Random; |
|---|
| 925 | 924 | import tango.core.Thread; |
|---|
| 926 | 925 | import tango.time.StopWatch; |
|---|
| | 926 | import tango.math.random.Kiss; |
|---|
| 927 | 927 | |
|---|
| 928 | 928 | void main() |
|---|
| … | … | |
| 980 | 980 | auto keys = new int[count]; |
|---|
| 981 | 981 | foreach (ref vv; keys) |
|---|
| 982 | | vv = Random.shared.next(int.max); |
|---|
| | 982 | vv = Kiss.shared.toInt(int.max); |
|---|
| 983 | 983 | |
|---|
| 984 | 984 | // benchmark adding |
|---|
Download in other formats:
|
 |
 |
|
 |
Copyright © 2006-2008 Tango. All Rights Reserved. | Page Width:
Static or
Dynamic