FirstClassトップページ


 ヘルプの目次
このヘルプについて このヘルプについて
 
エンドユーザ向けヘルプ エンドユーザ向けヘルプ
Client Help クライアントヘルプ
Web Help Webアクセスヘルプ
ScreenReader Help スクリーンリーダ
Form フォーム
Synchronization 同期
Definitions 用語
container コンテナ
 
管理者向けヘルプ 管理者向けヘルプ
Administration サーバの管理
Internet Services インターネットサービス
Customization Tools カスタマイズツール(英語)
Administering OTSW OTSWの管理
OTSW Custodian OTSW Custodian
Using FirstClass ED FirstClass ED(英語)
 
バナー:
 
 HashTable
 
Purpose
The HashTable keyword class provides an extremely high performance method for storing arbitrary data values in memory for fast retrieval.
Example
Dim ht as HashTable
Dim i as Integer
Dim Items as Integer
Dim t as PerfTimer
Dim x as Integer

Items = 100000

Debug "Testing overhead to execute the loop..."
t.Start
for i = 0 to Items-1
 x = x + 1
next i
Debug "Overhead test took " & t.ElapsedMS & "ms" & fcCRLF

Debug "Adding " & items & " items..."
t.Start
for i = 0 to Items-1
 ht.Add("Test " & i,i)
next i
Debug "Adding " & ht.NumItems & " took " & t.ElapsedMS & "ms" & fcCRLF

Debug "Item 5 is " & ht.Find(5)

Debug "Finding all items in reverse..."
t.Start
for i = Items-1 to 0 step -1
 ht.Find(i)
next i
Debug "Finding " & ht.NumItems & " took " & t.ElapsedMS & "ms" & fcCRLF

Debug "Deleting an item..."
ht.Remove(3)
Debug "Items remaining: " & ht.NumItems & fcCRLF

Debug "Replace all items in reverse..."
t.Start
for i = Items-1 to 0 step -1
 ht.Replace("Replace Test " & i,i)
next i
Debug "Replacing " & ht.NumItems & " took " & t.ElapsedMS & "ms" & fcCRLF

Debug "Resetting tables..."
ht.Reset
Debug "Items remaining: " & ht.NumItems & fcCRLF


 

Copyright(C) 2002-2012 FC Management Co. All Rights Reserved<