indy-singh / stringsareevil Goto Github PK
View Code? Open in Web Editor NEWReducing memory allocations from 7.5GB to 32KB
Home Page: https://indy.codes/strings-are-evil
License: MIT License
Reducing memory allocations from 7.5GB to 32KB
Home Page: https://indy.codes/strings-are-evil
License: MIT License
Can you share example-input.csv
for running samples?
System.IO.FileNotFoundException: 'Could not find file '...\StringsAreEvil\StringsAreEvil\example-input.csv'.'
First, thanks for building this and posting the blogs about it!
Second, do you have a license selected for this repository? Currently it's "All Rights Reserved" in most places. Quoting from https://choosealicense.com/no-permission/
When you make a creative work (which includes code), the work is under exclusive copyright by default. Unless you include a license that specifies otherwise, nobody else can copy, distribute, or modify your work without being at risk of take-downs, shake-downs, or litigation.
Would you be open to adding the MIT (or similar) license to this repository?
Thanks!
๐ฉ
This works fine for the test data, but if the first column was variable length we need to make sure we aren't matching something else. For example if you edit test generator to also have ["MNOP"]=12, it will get evaluated the same as the ["MNO"] data.
I think something like the following would be the fix, but I haven't tested the performance impact.
line.StartsWith("MNO,")
Hi,
I ran the tests for both v1, v11, v14 etc, and v1 is the fastest, on my machine:
i9-7900X + 64GB + Samsung 960 EVO 1TB SSD
437MB , 10 millions record file, same structure as your test
Visual Studio 2017
#1 ViaStreamReader
Took: 12,906 ms
Allocated: 9,263,015 kb
Peak Working Set: 16,888 kb
Gen 0 collections: 1809
Gen 1 collections: 3
Gen 2 collections: 0
#11 ViaFileStreamWithArrayPoolAndStringBuilder
Took: 27,094 ms
Allocated: 24 kb
Peak Working Set: 13,360 kb
Gen 0 collections: 0
Gen 1 collections: 0
Gen 2 collections: 0
#14 ViaFileStreamWithStringBuilderWithCustomBufferSize: 256
Took: 23,656 ms
Allocated: 16 kb
Peak Working Set: 11,520 kb
Gen 0 collections: 0
Gen 1 collections: 0
Gen 2 collections: 0
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.