TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A look at the Mojo language for bioinformatics

148 点作者 blindseer超过 1 年前

15 条评论

fwip超过 1 年前
For what it&#x27;s worth, I couldn&#x27;t reproduce the benchmarks cited in the post, which claimed a 50% speedup over Rust on M1. The rust implementation was consistently about two to three times as fast as Mojo with the provided test scripts and datasets. It&#x27;s possible I was compiling the Mojo program suboptimally, though.<p><pre><code> hyperfine -N --warmup 5 test&#x2F;test_fastq_record &#x27;needletail_test&#x2F;target&#x2F;release&#x2F;rust_parser data&#x2F;fastq_test.fastq&#x27; Benchmark 1: test&#x2F;test_fastq_record Time (mean ± σ): 1.936 s ± 0.086 s [User: 0.171 s, System: 1.386 s] Range (min … max): 1.836 s … 2.139 s 10 runs Benchmark 2: needletail_test&#x2F;target&#x2F;release&#x2F;rust_parser data&#x2F;fastq_test.fastq Time (mean ± σ): 838.8 ms ± 4.4 ms [User: 578.2 ms, System: 254.3 ms] Range (min … max): 833.7 ms … 848.2 ms 10 runs Summary needletail_test&#x2F;target&#x2F;release&#x2F;rust_parser data&#x2F;fastq_test.fastq ran 2.31 ± 0.10 times faster than test&#x2F;test_fastq_record </code></pre> (Edit: I built the Rust version with `cargo build --release` on Rust 1.74, and Mojo with `mojo build` on Mojo 0.7.0.)
评论 #39340208 未加载
评论 #39346395 未加载
WeatherBrier超过 1 年前
The language is far from stable, but I have had a LOT of fun writing Mojo code. I was surprised by that! The only promising new languages for low-level numerical coding that can dislodge C&#x2F;C++&#x2F;Fortran somewhat, in my opinion, have been Julia&#x2F;Rust. I feel like I can update that last list to be Julia&#x2F;Rust&#x2F;Mojo now.<p>But, for my work, C++&#x2F;Fortran reign supreme. I really wish Julia had easy AOT compilation and no GC, that would be perfect, but beggars can&#x27;t be choosers. I am just glad that there are alternatives to C++&#x2F;Fortran now.<p>Rust has been great, but I have noticed something: there isn&#x27;t much of a community of numerical&#x2F;scientific&#x2F;ML library writers in Rust. That&#x27;s not a big problem, BUT, the new libraries being written by the communities in Julia&#x2F;C++ have made me question the free time I have spent, writing Rust code for my domain. When it comes time to get serious about heterogeneous compute, you have to drop Rust and go back to C++&#x2F;CUDA, when you try to replicate some of the C++&#x2F;CUDA infrastructure for your own needs in Rust: you really feel alone! I don&#x27;t like that feeling ... of constantly being &quot;one of the few&quot; interested in scientific&#x2F;numerical code in Rust community discussions ...<p>Mojo seems to be betting heavy on a world where deep heterogeneous compute abilities are table stakes, it seems the language is really a frontend for MLIR, that is very exciting to me, as someone who works at the intersection of systems programming and numerical programming.<p>I don&#x27;t feel like Mojo will cause any issues for Julia, I think that Mojo provides an alternative that complements Julia. After toiling away for years with C&#x2F;C++&#x2F;Fortran, I feel great about a future where I have the option of using Julia, Mojo, or Rust for my projects.
评论 #39338794 未加载
评论 #39340777 未加载
评论 #39347598 未加载
jdiaz97超过 1 年前
Great post. I think Mojo&#x27;s claims like the speedup over Rust are a problem, like the 65000x speedup over Python. How can we differentiate between good new tech and Silicon Valley shenanigans when they use claims like that? They do nice titles and slogans but are shady in substance
评论 #39339702 未加载
评论 #39342488 未加载
评论 #39343379 未加载
评论 #39338804 未加载
评论 #39338534 未加载
ubj超过 1 年前
Great post, but I think the author missed a few advantages of Mojo:<p>* Mojo provides first-class support for AoT compilation of standalone binaries [1]. Julia provides second-class support at best.<p>* Mojo aims to provide first-class support for traits and a modern Rust-like memory ownership model. Julia has second-class support for traits (&quot;Tim Holy trait trick&quot;) and uses a garbage collector.<p>To be clear, I really like Julia and have been gravitating back to it over time. Julia has a very talented community and a massive head start on its package ecosystem. There are plenty of other strengths I could list as well.<p>But I&#x27;m still keeping my eye on Mojo. There&#x27;s nothing wrong with having two powerful languages learning from each other&#x27;s innovations.<p>[1]: <a href="https:&#x2F;&#x2F;docs.modular.com&#x2F;mojo&#x2F;manual&#x2F;get-started&#x2F;hello-world.html#build-an-executable-binary" rel="nofollow">https:&#x2F;&#x2F;docs.modular.com&#x2F;mojo&#x2F;manual&#x2F;get-started&#x2F;hello-world...</a>
评论 #39338723 未加载
评论 #39338692 未加载
mcqueenjordan超过 1 年前
Another point of clarification that is of great importance to the results, and is a common Rust newcomer error: The benchmarks for the Rust implementation (in the original post that got all the traction) were run with a &#x2F;debug&#x2F; build of rust, i.e. not an optimized binary compiled with --release.<p>So it was comparing something that a) didn&#x27;t do meaningful parsing against b) the full parsing rust implementation in a non-optimized debug build.
评论 #39339603 未加载
评论 #39338018 未加载
评论 #39351235 未加载
stellalo超过 1 年前
&gt; If I include the time for Julia to start up and compile the script, my implementation takes 354 ms total, on the same level as Mojo&#x27;s.<p>I don’t think the article mentions it explicitly, but I suppose the timing is from Julia 1.10: as far as I can remember, this kind of execution time would have been impossible in Julia 1.8 even to run a simple script.<p>Bravo, Julia devs. Bravo.
评论 #39338834 未加载
dr_kiszonka超过 1 年前
Folks using multiple languages, what is your workflow?<p>I do most DS&#x2F;ML work in Python but move to R for stats, and publication-ready plots and tables (gt is really great). I often switch between them frequently, which is a hassle in the EDA and prototyping stages, especially when using notebooks. I enjoy Quarto in RStudio, but the VS Code version is not that great.<p>How do you make it work?<p>Also, after so many years using Python and R, I would love to learn a new language, even if only for just a couple of use cases. I considered Elixir for parallel processing and because it has a nice syntax, but ultimately decided against it because it can be a little slow and isn&#x27;t used much in my area (sadly!). Rust seems to require too much time to get decent at it. Any recommendations? (Prolog?)
评论 #39341712 未加载
评论 #39340938 未加载
评论 #39342185 未加载
评论 #39345497 未加载
f6v超过 1 年前
As someone who practices bioinformatics, it doesn’t seem appealing. Bioinformatics is like 0.1% dealing with FASTQ files and the rest is using the ecosystem of libraries for statistics and plotting. Many of them in R, by the way.
评论 #39338588 未加载
评论 #39339070 未加载
评论 #39338220 未加载
gandalfgeek超过 1 年前
&gt; It does grate me then, when someone else manages to raise 100M dollars on the premise of reinventing the wheel to solve the exact same problem, but from a worse starting point because they start from zero and they want to retain Python compatibility. Think of what money like that could do to Julia!<p>Python is a juggernaut with total control of the ML space and is a huge part (even if less dominant) in modern scientific computing.<p>A VC has way better chances of success building solutions compatible with Python rather than replacing it.
评论 #39341379 未加载
hkmaxpro超过 1 年前
Related:<p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39290958">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39290958</a><p><a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39296559">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=39296559</a>
math_dandy超过 1 年前
I’m really excited about Mojo’s potential. But I don’t think it’s ready for real use outside it’s AI niche yet. Being able to call Mojo functions from Python is the sentinel capability I’m waiting for before considering its use for general purpose code.
refulgentis超过 1 年前
I felt like I learned more about the author than Mojo.<p>- Never actually runs it. Seriously.<p>- Wants us to know it&#x27;s definitely not a real parser as compared to Needlepoint...then 1000 words later, &quot;real parser&quot; means &quot;handles \r\n...and validates 1st &amp; 3rd lines begin with @ and +...seq and qual lines have the same length&quot;.<p>- At the end, &quot;Julia is faster!!!!&quot; off a one-off run on their own machine, comparing it to benchmark times on the Mojo website<p>It reads as an elaborate way to indicate they don&#x27;t like that the Mojo website says it&#x27;s faster, coupled to a entry-level explanation of why it is faster, coupled to disturbingly poor attempts to benchmark without running Mojo code
评论 #39338217 未加载
评论 #39339352 未加载
zaptheimpaler超过 1 年前
How does a software engineer transition into bioinformatics or computational biology? I&#x27;ve taken some online courses on bioinformatics and have some experience in large distributed jobs but these jobs seem few and far in between and generally want M.S&#x2F;PhDs in bioinformatics. Is it really a field that&#x27;s not viable to enter without an MS?
评论 #39340165 未加载
评论 #39345595 未加载
评论 #39340401 未加载
jimbob45超过 1 年前
Crystal was never able to find traction as a Ruby clone that could compete with C speeds. Why would a Python clone have any better luck? I don’t think anyone would accuse Python of being dramatically more usable than Ruby.
评论 #39337843 未加载
评论 #39338030 未加载
评论 #39337901 未加载
评论 #39337866 未加载
评论 #39345615 未加载
评论 #39338603 未加载
评论 #39338043 未加载
zer00eyz超过 1 年前
&gt;&gt;&gt; As a bioinformatician who is obsessed with high-performance, high-level programming, that&#x27;s right in my wheelhouse!... Mojo currently only runs on Ubuntu and MacOS, and I run neither. So, I can&#x27;t run any Mojo code<p>1. Back to the rust vs mojo article that kicked this off... this isnt someone who is going to use rust.<p>2. Availably, portability, ease of use... These are the reasons python is winning.<p>3. I am baffled that this person has to write code as part of their job, and does not know what a VM is! Note: This isnt a slight against the author, I doubt they are an isolated case. I think this is my own cognitive dissonance showing.
评论 #39338133 未加载
评论 #39338037 未加载