Commit Graph

440 Commits

Author SHA1 Message Date
ac5c45f8d5 fxhashmap faster afterall... 2024-08-28 08:52:40 +02:00
b8f589096f extract hash into own module 2024-08-27 13:54:23 +02:00
c306083192 run cargo fmt 2024-08-27 13:24:14 +02:00
a45ddd2dc0 use easy_parallel from smol project instead of std::thread. No performance improvement, but easier 2024-08-27 13:23:51 +02:00
e832475fc3 stuff 2024-08-27 11:48:08 +02:00
608cbb59e5 managed to get faster again by searching hashmap using &str and only converting to String on insertion. Removed FxHashMap again 2024-08-27 10:57:23 +02:00
53ea542f36 update dependencies, create benches 2024-08-19 14:58:34 +02:00
d246c54cd9 removed polars example because it wouldn't compile anymore, even when updating to latest version. It also massively reduced the number of downloaded crates 2024-08-19 13:55:19 +02:00
2a89d061a0 Use FxHashMap for multi_threaded_smol.rs 2024-08-19 10:57:18 +02:00
7add8793a5 managed to get library version on par with the reference implementation by using memmap2. I'm understanding scoped threads a little better now... I think
The fixed line length solution is still just as slow, even using memmap
2024-08-19 10:39:19 +02:00
b1d7ebaaea Create multi threaded version using smol for async reading of the file ~1 seconds faster 2024-08-13 14:14:42 +02:00
bbc89aa2b3 Create single threaded version using smol for async reading of the file 46 -> 40 seconds 2024-08-13 13:50:49 +02:00
b53212103b Tried looking at what the performance would be if I read the data from a file where every line would have the same length ie. not having to read until eol. But despite not having to search the \n byte (or ; because every station name and temperatures are padded with null bytes) and having a fixed size array instead of vec this is slower (the normal read_until version is actually still just as fast, while the new one is 10x slower) 2024-08-12 10:48:07 +02:00
8ffea918c4 either it's slightly faster or it's a measurement error 2024-08-05 12:52:57 +02:00
3b3801ba0d Going back because compile times trippled 2024-08-05 11:22:08 +02:00
1c066ec113 accidentally committed bug 2024-08-05 10:54:59 +02:00
13c54a2811 FxHashMap made me faster, memmap makes me slower, guess I'm using it wrong 2024-08-05 10:53:17 +02:00
40627f9aeb add solution using libraries to see how fast I can get. For now no difference 2024-08-02 11:43:23 +02:00
45ae29d3cd organize differently, added criterion as dev-dependency for benchmarks 2024-08-01 15:02:24 +02:00
8eefe06e8b Formatting 2024-08-01 10:23:14 +02:00
34768d3ec1 forgot feature flag in last commit 2024-07-31 14:00:00 +02:00
0ffbff4cbf added 2 new implementations from users who commented on my reddit post as a comparison 2024-07-31 13:58:42 +02:00
25d20169aa some improvements by reducing the casts, implemented a get_pos function to get position of byte in byteslice by bitmasking... slightly slower 2024-07-31 12:49:16 +02:00
2c23e30fe0 hash stationnames myself for faster HashMap 2024-07-31 09:27:02 +02:00
da72f38e42 don't need own parse_line function 2024-07-29 12:09:05 +02:00
5aa94e67d1 use read_until method instead of custom function because it is faster than mine using the Bytes struct 2024-07-25 15:35:10 +02:00
c6b8273d65 applied clippy 2024-07-25 13:05:53 +02:00
e230a5ce2c My multi-treaded version is now faster than polars and takes less time to compile. It's a little more complex though 2024-07-25 10:03:37 +02:00
dcaca0cc65 managed to make my solution super fast... but it's also incorrect 2024-07-24 15:19:17 +02:00
16cf4ca2ca moved from reading String to reading bytes. A little faster, still need to implement for multithreaded solution 2024-07-23 16:30:50 +02:00
b4e3992c65 mostly made output a bit nicer 2024-07-23 13:23:26 +02:00
393f802741 remove the need for mutex by using channels 2024-07-23 13:23:26 +02:00
327fe8564e use scopes to allow to use mutex without arc
apply clippy to my implementations
2024-07-23 13:23:26 +02:00
14d608b209 Fastest yet with scaled integers instead of floats 2024-07-23 13:23:26 +02:00
2f82e8788d moved rust implementation to /src/main/rust 2024-07-23 13:23:26 +02:00
Ruslan Kovtun
dfec2cdbe6 Fixes progress bar for create_measurements.py 2024-03-03 13:10:46 +01:00
Daniel Patrick
6125ba4dfa Explicit float in commented out code 2024-03-03 13:10:15 +01:00
Daniel Patrick
6daa93cca1 More accurate file size estimate 2024-03-03 13:10:15 +01:00
Eugene Huang
e1fb378acc
Add elh's Go solution (#435)
* add elh's Go solution

* update elh. fix a bad for loop and add some tuning env vars
2024-02-02 21:37:28 +01:00
Martin
f02279df8c
martin2038: first submission (#665)
* first double as int

* - hashcode

* JAVA_OPTS empty

* native

* native

* CalculateAverage_melgenek
https://questdb.io/blog/building-faster-hash-table-high-performance-sql-joins/#fastmap-internals

* mvn formatting

* jvm model

* 10k name

* 10k name

* round mean

* limit ChunkSize  smaller than Integer.MAX_VALUE

---------

Co-authored-by: martin.cong <martin.cong@zhulinkeji.com>
2024-02-02 21:04:30 +01:00
Smoofie
a78c1fc973
Submission for Smoofie (#701)
* Smoofie solution. Kinda slow but it was fun :)

* Format according to mvn build

* Fix semicolon detection, which cause invalid temperature parsing and subsequently segmentation faults due to counter addressing
2024-02-01 19:32:54 +01:00
Chris Bellew
8ab88e9f5c
SIMD parsing newlines, integer parsing, custom hashtable with SIMD lookup table for equality (#663)
* Add submission

* Added explanatory comment

* Added comment

* Rename shell script

* Commit formatting

* When last bytes don't fill a vector, take directly

* Add comment

* Deal with subset collisions
2024-02-01 16:59:05 +01:00
JurenIvan
1b23172afb
My first submission (#697)
* Common sense implementation

* fix filename

* formatting

* remove excess system.out.println

* fix hash collisions

* ajdust so taht segment size smaller than Integer.MAX_VALUE
2024-02-01 14:30:22 +01:00
yourwass
75bece5364
improved 2nd and final submission (#685) 2024-02-01 12:25:58 +01:00
Anita SV
101993f06d
CA_vaidhy final changes. (#708) 2024-02-01 12:15:23 +01:00
Diego Parra
bec0cef2d3
dpsoft: first submission (#572)
* dpsoft: first submission

* minor clean up

* map with linear probing

* clean up

* update prepare

* clean up

* remove string format

* add credits

* fix format

* use prepare.sh

* graal 21.0.2

* fix differences

* clean up

* underflow protection

* improve segments generation logic

* clean up

* remove unnecessary alignment in findsegment

* new try

* fix number of segments
2024-02-01 12:06:28 +01:00
Panagiotis Drakatos
2aed039f17
My Probably last attempt to optimize performance (#693)
* CalculateAverage_pdrakatos

* Rename to be valid with rules

* CalculateAverage_pdrakatos

* Rename to be valid with rules

* Changes on scripts execution

* Fixing bugs causing scripts not to be executed

* Changes on prepare make it compatible

* Fixing passing all tests

* Increase direct memory allocation buffer

* Fixing memory problem causes heap space exception

* Fresh solution to optimize performance of the execution

* New Fresh solution with optimized performance with Custom Hashtable

* Increase maxperm size and xmx to avoid heap spaces error
2024-02-01 12:02:45 +01:00
gonix
1e7314d5fb
CalculateAverage_gonix update (#706)
Backported some of the optimizations from unsafe solution.

Co-authored-by: Giedrius D <d.giedrius@gmail.com>
2024-02-01 11:53:46 +01:00
tivrfoa
fdd539e1f9
Exit earlier from loop when a new Result is created (#668)
* Exit earlier from loop when a new Result is created

 *   3) Make a cache of long[] name to String, to avoid `ByteBuffer.allocate`
 * and creating new UTF-8 strings. I didn't profile, so it's just a guess
 * that this map will be a bit faster. Although it's outside the main loop, so
 * not a big difference ...;
 *   4) Exit earlier from loop if a new entry was created.

* revert: Remove cache to city name

* As I was not able to make it faster... make it slower

As I was not able to make it faster ... so I'll make it slower,
because my current solution should *not* stay at the top, as it added
basically nothing.
2024-02-01 11:49:47 +01:00
Sumit Chaudhary
e7c92094bd
EduardoSaverin (#689)
* EduardoSaverin

UserName : EduardoSaverin
Total Time : 15.408
CPU : 8 Core (Apple M1 Pro)
RAM : 16GB

* Update CalculateAverage_EduardoSaverin.java

Removed ConcurrentHashMap with Reentrant Lock + HashMap. Since multiple threads causing problems.
2024-02-01 11:41:13 +01:00