Тёмный

Python vs. Julia with deeply nested dictionaries 

EKB PhD
Подписаться 488
Просмотров 325
50% 1

Опубликовано:

 

27 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 8   
@exxzxxe
@exxzxxe 2 месяца назад
This is the second time I have viewed this video. Thank you for performing the benchmark-testing work I would have had to do- saved me quite a bit of time. Now a question: Do you believe Mojo will progress to point where its dictionary performance will equal or exceed Python's?
@ekbphd3200
@ekbphd3200 2 месяца назад
You're very welcome! I'm glad that enjoyed it. I hope and assume Mojo's native dictionary will get faster with future releases. In the changelog for Mojo v.24.4 the creators say: "Significant performance improvements when inserting into a Dict. Performance on this metric is still not where we'd like it to be, but it is much improved." docs.modular.com/mojo/changelog#v244-2024-06-07 With the "still not where we'd like it to be" I assume that they will continue to work on the native dictionary.
@oterotube13
@oterotube13 2 месяца назад
So at the end is Julia vs. C
@ekbphd3200
@ekbphd3200 2 месяца назад
I guess. I don't know how Python's for loops compare to C's, but I guess the dictionary itself is implemented in C.
@alextantos658
@alextantos658 3 месяца назад
And ome could also try out the Dictionaries.jl package in Julia that is much more performant and efficient than he base Julia Dict type.
@ekbphd3200
@ekbphd3200 3 месяца назад
Thanks for the idea. I just tried Dictionary.jl to get the frequencies of words across 40k files with 230m words, and it was only slightly faster than Base.Dict (47s vs. 51s). I'll have to implement Dictionary.jl with a deeply nested dictionary and see how it does.
@alextantos658
@alextantos658 3 месяца назад
@@ekbphd3200 ​ Thanks for the nice videos and the work! Besides Dictionary.jl, Julia offers several other options from DataStructures.jl, such as SwissDict and other data structures that are claimed to be faster. What I appreciate about Julia is its diverse range of options, often re-implemented within the language itself without needing to track/tune C implementations of basic operations.. Therefore, while comparing base types between languages provides valuable insights, it doesn't fully capture the extent of Julia's capabilities. PS: I am a Python user and fan too..
@ekbphd3200
@ekbphd3200 2 месяца назад
Here's a quick comparison with a simple frequency dictionary: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-ROgQASMN_lI.html
Далее
How much faster has Mojo's dictionary gotten?
7:40
Просмотров 4,2 тыс.
Beatrise (пародия) Stromae - Alors on danse
00:44
Applied optimization with JuMP at SINTEF
26:37
ML Was Hard Until I Learned These 5 Secrets!
13:11
Просмотров 307 тыс.
Is it worth it to call Rust from Python with PyO3?
8:50
The Only Database Abstraction You Need | Prime Reacts
21:42
threading vs multiprocessing in python
22:31
Просмотров 581 тыс.
You Are WRONG About 0 Based Indexing
25:02
Просмотров 290 тыс.
Turns out REST APIs weren't the answer (and that's OK!)
10:38
LINQ's INSANE Improvements in .NET 9
11:26
Просмотров 46 тыс.