Skip to content

Commit 05056d3

Browse files
committed
Update getting_started.md
1 parent 7237457 commit 05056d3

File tree

1 file changed

+26
-18
lines changed

1 file changed

+26
-18
lines changed

docs/home/getting_started.md

Lines changed: 26 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,15 @@ ENC = CSVix.FileEncoding
9494
{: .text-grey-dk-300 .bg-yellow-000 }
9595

9696
## Benchmark
97-
The benchmark provided here is focused on the supposed most critical operation, this is the parse one when working with CSV files. Although, benchmark for the exportation procedure is given on.
97+
98+
>📝**Note**
99+
>{: .text-grey-lt-000 .bg-green-000 }
100+
>Since the v2.0.0 of the `CSVinterface` we adopted the variant data Type array for internals data storage. Is well-known that this data Type has the worst performance in the VBA universe, but we desire bring to user the possibility to work with jagged arrays and let the class pay the cost in performance by that choice.
101+
>
102+
>However, if you need more data processing performance and not want support to jagged arrays, you can download [this version]( https://github.com/ws-garcia/VBA-CSV-interface/releases/tag/1.1.6) of the `CSVinterface` class.
103+
{: .text-grey-dk-300 .bg-grey-lt-000 }
104+
105+
The benchmark provided here is focused on the supposed most critical operation, this is the parse one for many authors. Although, benchmark for the exportation procedure is given on.
98106

99107
The class was tested against two solutions (the one from [@Senipah](https://github.com/Senipah/VBA-Better-Array) and the other from [@sdkn104](https://github.com/sdkn104/VBA-CSV)) using a laptop running `Win 10 Pro x64, Intel® Core™ i7-4500U CPU @1.80-2.40 GHz, 8 GB RAM, Excel 2019 x86`. The test works in two ways, 100K calls to the import procedure over three (3) different files, each of this with three records (3) and four fields (4), or one (1) call to the import procedure parsing a larger file. In all cases, the overall work load is 1.2MM of fields. The CSV files are:
100108
* _RFC-4180_OH.csv_: **OH**- Only the headers are quoted (4 fields)
@@ -119,27 +127,27 @@ First three of files have special chars (line breaks, commas, double quotes) int
119127
<tbody>
120128
<tr>
121129
<td style="text-align: left;"><em>ImportFromCSVString<br>(W. García)</em></td>
122-
<td style="text-align: right;"><p style="color:blue;">2.4844</p></td>
123-
<td style="text-align: right;"><p style="color:blue;">2.6797</p></td>
124-
<td style="text-align: right;"><p style="color:blue;">2.5625<br>0.9531</p></td>
125-
<td style="text-align: right;"><p style="color:blue;">2.9844</p></td>
126-
<td style="text-align: right;"><p style="color:blue;">4.3906<br>2.4844</p></td>
130+
<td style="text-align: right;"><p style="color:blue;">3.4297</p></td>
131+
<td style="text-align: right;"><p style="color:blue;">3.4609</p></td>
132+
<td style="text-align: right;"><p style="color:blue;">3.2031<br>1.3086</p></td>
133+
<td style="text-align: right;"><p style="color:blue;">3.7266</p></td>
134+
<td style="text-align: right;"><p style="color:blue;">5.0312<br>2.9492</p></td>
127135
</tr>
128136
<tr>
129137
<td style="text-align: left;"><em>FromCSVString<br>(@Senipah)</em></td>
130-
<td style="text-align: right;">13.5312</td>
131-
<td style="text-align: right;">13.4922</td>
132-
<td style="text-align: right;">14.4453</td>
133-
<td style="text-align: right;">16.0234</td>
134-
<td style="text-align: right;">22.3047</td>
138+
<td style="text-align: right;">14.9219</td>
139+
<td style="text-align: right;">14.1914</td>
140+
<td style="text-align: right;">14.2617</td>
141+
<td style="text-align: right;">16.2227</td>
142+
<td style="text-align: right;">22.9102</td>
135143
</tr>
136144
<tr>
137145
<td style="text-align: left;"><em>ParseCSVToArray<br>(@sdkn104)</em></td>
138-
<td style="text-align: right;">3.5000</td>
139-
<td style="text-align: right;">3.7969</td>
140-
<td style="text-align: right;">4.5156</td>
141-
<td style="text-align: right;">7.2812</td>
142-
<td style="text-align: right;">11.7422</td>
146+
<td style="text-align: right;">4.0898</td>
147+
<td style="text-align: right;">4.6992</td>
148+
<td style="text-align: right;">4.9688</td>
149+
<td style="text-align: right;">8.0312</td>
150+
<td style="text-align: right;">15.0938</td>
143151
</tr>
144152
</tbody>
145153
</table>
@@ -163,8 +171,8 @@ The images bellow shows the overall performance for the imports and exports oper
163171

164172
### Conclusions
165173

166-
- `ImportFromCSVString` is the tested faster one import method, outperforming its nearer counterpart by a factor of 2.5x in performance.
167-
- The CSV syntax impacts the performance in this way: as the number of escaped fields is increased, the performance is decreased.
174+
- `ImportFromCSVString` is the tested faster one import method, outperforming its nearer counterpart by a 2x to 3x factor in performance.
175+
- The CSV syntax slow-down the performance when the number of escaped fields, the number of white spaces between fields and the lines-breaks into fields are increased.
168176
- When working with CSVs compliant with the RFC-4180 specs, the `ImportFromCSVString` method is faster than the `ExportToCSV` method. This scenario is inverted when working with well-formed CSVs without checking the RFC-4180 specs.
169177

170178
## Licence

0 commit comments

Comments
 (0)