Skip to content

Commit 81d777d

Browse files
PhelsongJosh S Wilkinsoncarolinefrasca
authored
mojo_csv 1.4.0 bump (#154)
* mojo_csv * Update recipe.yaml for CI * unquote for ci * update test * Update source git URL * change tests syntax * verify 25.3.0 and update test * update test * update csv path * update test to cwd * update build and versioning * add logo * update readme * update mojo_csv to 1.3 * 1.4.0 --------- Co-authored-by: Josh S Wilkinson <[email protected]> Co-authored-by: Caroline Frasca <[email protected]>
1 parent 9c2bbed commit 81d777d

File tree

2 files changed

+37
-17
lines changed

2 files changed

+37
-17
lines changed

recipes/mojo_csv/README.md

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
<!-- ![mojo_csv_logo](./mojo_csv_logo.png) -->
23
<image src='./mojo_csv_logo.png' width='900'/>
34

@@ -18,7 +19,6 @@ channels = ["conda-forge", "https://conda.modular.com/max", "https://repo.prefix
1819

1920
`pixi add mojo_csv`
2021

21-
2222
##### Basic Usage
2323

2424
```mojo
@@ -46,6 +46,8 @@ fn main():
4646
```
4747

4848
#### BETA
49+
1.4.0 will be the last version where this isn't the default
50+
4951
```mojo
5052
ThreadedCsvReader(
5153
file_path: Path,
@@ -85,7 +87,6 @@ var reader = ThreadedCsvReader(
8587
num_threads=8
8688
)
8789
88-
8990
### Attributes
9091
9192
```mojo
@@ -96,8 +97,7 @@ reader.row_count : Int # total number of rows T->B
9697
reader.column_count : Int # total number of columns L->R
9798
reader.elements : List[String] # all delimited elements
9899
reader.length : Int # total number of elements
99-
100-
```
100+
````
101101

102102
##### Indexing
103103

@@ -107,7 +107,6 @@ currently the array is only 1D, so indexing is fairly manual.
107107
reader[0] # first element
108108
```
109109

110-
111110
### Performance
112111

113112
- average times over 1k iterations
@@ -125,31 +124,52 @@ large file benchmark (2m rows)
125124
✨ Pixi task (bench): mojo bench.mojo
126125
running benchmark for micro csv:
127126
average time in ms for micro file:
128-
0.007699
127+
0.01875
129128
-------------------------
130129
running benchmark for mini csv:
131130
average time in ms for mini file:
132-
0.241136
131+
0.07328
133132
-------------------------
134133
running benchmark for small csv:
135134
average time in ms for small file:
136-
1.388513
135+
0.417368
137136
-------------------------
138137
running benchmark for medium csv:
139138
average time in ms for medium file:
140-
121.217188
139+
36.45899
141140
-------------------------
142141
running benchmark for large csv:
143142
average time in ms for large file:
144-
3582.876541
143+
1253.19458
145144
```
146145

147-
Performance comparison on various file sizes (average of multiple runs):
146+
=== ThreadedCsvReader Performance Comparison ===
148147

149-
| File Size | Single-threaded | Multi-threaded | Speedup |
150-
| ------------ | --------------- | -------------- | ------- |
151-
| 1,000 rows | 1.42ms | 1.30ms | 1.09x |
152-
| 100,000 rows | 125ms | 105ms | 1.19x |
148+
Small file benchmark (1,000 rows):
149+
Single-threaded:
150+
Average time: 0.500384 ms
151+
Multi-threaded:
152+
Average time: 0.451094 ms
153+
Speedup: 1.11 x
154+
-------------------------
155+
Medium file benchmark (100,000 rows):
156+
Single-threaded:
157+
Average time: 38.124275 ms
158+
Multi-threaded:
159+
Average time: 24.650092 ms
160+
Speedup: 1.55 x
161+
-------------------------
162+
Large file benchmark (2,000,000 rows):
163+
Single-threaded:
164+
Average time: 1175.345429 ms
165+
Multi-threaded:
166+
Average time: 830.02685 ms
167+
Speedup: 1.42 x
168+
-------------------------
169+
Summary:
170+
Small file speedup: 1.11 x
171+
Medium file speedup: 1.55 x
172+
Large file speedup: 1.42 x
153173

154174
_Tested on AMD 7950x (16 cores) @ 5.8GHz_
155175

recipes/mojo_csv/recipe.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
context:
2-
version: 1.3.0
2+
version: 1.4.0
33

44

55
package:
@@ -8,7 +8,7 @@ package:
88

99
source:
1010
- git: https://github.com/Phelsong/mojo_csv.git
11-
rev: 4d6643f27fe15e86263cdc66fd383cf345811228
11+
rev: d92e7b72933445c71c463d3f9eb52404dd01edf2
1212

1313

1414
build:

0 commit comments

Comments
 (0)