---
# System prepended metadata

title: Final Version

---

# Final Version

## 耗時



### With pinyin
| Step                                                                     | Volume  | Time                |
| ------------------------------------------------------------------------ | ------- | ------------------- |
| Pinyin preprocess                                                        | 42150it | 00:08, 5070.43it/s  |
| Decoding Message                                                         | 9987it  | 00:00, 34194.37it/s |
| Detecting account                                                        | 9987it  | 00:04, 2245.44it/s  |
| Determining language                                                     | 9987it  | 00:21, 464.02it/s   |
| Predicting zh-message label, detecting rule-based word, detecting pinyin | 4480it  | 35:07,  2.13it/s    |

### Without pinyin
| Step                                                                     | Volume | Time                |
| ------------------------------------------------------------------------ | ------ | ------------------- |
| Decoding Message                                                         | 9987it | 00:00, 34194.37it/s |
| Detecting account                                                        | 9987it | 00:04, 2245.44it/s  |
| Determining language                                                     | 9987it | 00:21, 464.02it/s   |
| Predicting zh-message label, detecting rule-based word, detecting pinyin | 4480it | 26:10,  2.85it/s    |

## 優化

### 拼音表預處理

| Step                                                                     | Volume  | Time                |
| ------------------------------------------------------------------------ | ------- | ------------------- |
| Pinyin preprocess                                                        | 42150it | 0.03 sec  |
- 直接讀取拼音表，省去拼音轉換的時間 (減少近8秒)

### pinyin detect 階段將已判斷過的label存起來

| Step                                                                     | Volume | Time             |
| ------------------------------------------------------------------------ | ------ | ---------------- |
| Predicting zh-message label, detecting rule-based word, detecting pinyin | 4480it | 27:20, 2.73it/s |
- 此方法可在遇到相同拼音或是相同詞時，不需要再進到拼音檢測的環節
- 耗時減少8分鐘左右(+0.6it/s)