llvm-project
go
llvm-project | go | |
---|---|---|
356 | 2,101 | |
26,431 | 120,631 | |
3.3% | 0.9% | |
10.0 | 10.0 | |
3 days ago | 6 days ago | |
LLVM | Go | |
GNU General Public License v3.0 or later | BSD 3-clause "New" or "Revised" License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
llvm-project
-
Compilers Are (Too) Smart
The background here is that "ctpop < 2" or "ctpop == 1" (depending on zero behavior) is LLVM's canonical representation for a "power of two" check. It is used on the premise that the backend will expand it back into a cheap bitwise check and not use an actual ctpop operation. However, due to complex interactions in the backend, this does not actually happen in this case (https://github.com/llvm/llvm-project/issues/94829).
-
What errors are lurking in LLVM code?
The checked project version is LLVM 18.1.0.
-
Qualcomm's Oryon LLVM Patches
I think they should probably set LoopMicroOpBufferSize to a non-zero value even if its not microarchitecturally accurate. This value is used in LLVM to control whether partial and runtime loop unrolling are enabled (actually only for that). Although some targets override this default behaviour, AArch64 only overrides it to enable partial and runtime unrolling for in-order models. I've left a review comment https://github.com/llvm/llvm-project/pull/91022/files#r16026... and as I note there, the setting seems to have become very divorced from microarchitectural reality if you look at how and why different scheduling models set it in-tree (e.g. all the Neoverse cores, set it to 16 with a comment they just copied it from the A57).
-
Yes, Ruby is fast, but…
In conclusion, none of the proposed changes to the Ruby version of the code makes a dent in the Crystal version. This is not entirely Crystal's doing: it uses the LLVM backend, which generates very optimized binaries.
-
Qt and C++ Trivial Relocation (Part 1)
As far as I know, libstdc++'s representation has two advantages:
First, it simplifies the implementation of `s.data()`, because you hold a pointer that invariably points to the first character of the data. The pointer-less version needs to do a branch there. Compare libstdc++ [1] to libc++ [2].
[1]: https://github.com/gcc-mirror/gcc/blob/065dddc/libstdc++-v3/...
[2]: https://github.com/llvm/llvm-project/blob/1a96179/libcxx/inc...
Basically libstdc++ is paying an extra 8 bytes of storage, and losing trivial relocatability, in exchange for one fewer branch every time you access the string's characters. I imagine that the performance impact of that extra branch is tiny, and massively confounded in practice by unrelated factors that are clearly on libc++'s side (e.g. libc++'s SSO buffer is 7 bytes bigger, despite libc++'s string object itself being smaller). But it's there.
The second advantage is that libstdc++ already did it that way, and to change it would be an ABI break; so now they're stuck with it. I mean, obviously that's not an "advantage" in the intuitive sense; but it's functionally equivalent to an advantage, in that it's a very strong technical answer to the question "Why doesn't libstdc++ just switch to doing it libc++'s way?"
-
Playing with DragonRuby Game Toolkit (DRGTK)
This Ruby implementation is based on mruby and LLVM and it’s commercial software but cheap.
- Add support for Qualcomm Oryon processor
-
Ask HN: Which books/resources to understand modern Assembler?
'Computer Architeture: A Quantitative Apporach" and/or more specific design types (mips, arm, etc) can be found under the Morgan Kaufmann Series in Computer Architeture and Design.
"Getting Started with LLVM Core Libraries: Get to Grips With Llvm Essentials and Use the Core Libraries to Build Advanced Tools "
"The Architecture of Open Source Applications (Volume 1) : LLVM" https://aosabook.org/en/v1/llvm.html
"Tourist Guide to LLVM source code" : https://blog.regehr.org/archives/1453
llvm home page : https://llvm.org/
llvm tutorial : https://llvm.org/docs/tutorial/
llvm reference : https://llvm.org/docs/LangRef.html
learn by examples : C source code to 'llvm' bitcode : https://stackoverflow.com/questions/9148890/how-to-make-clan...
-
Flang-new: How to force arrays to be allocated on the heap?
See
https://github.com/llvm/llvm-project/issues/88344
https://fortran-lang.discourse.group/t/flang-new-how-to-forc...
- The LLVM Compiler Infrastructure
go
-
I've compared nearly all Rust crates.io crates to contents of their Git repos
The problem is that if you clone the Git repository, or view it on GitHub, you have no assurance that you're seeing the same code that the go command or the Go module proxy saw. The author of a malicious module could change the Git tag to point to a different, benign, commit after the Go module proxy caches the malicious copy. There are other tricks an attacker can play as well: https://github.com/golang/go/issues/66653
Ultimately, if you're doing a code audit, you have to compute the checksum of the code that you're looking at, and compare it against the entry in go.sum or the checksum database to make sure you're auditing the right copy.
-
Function fitting in Go
must.Do proposal https://github.com/golang/go/issues/54297
-
Criando um modulo xk6 para k6
Go instalado
- Orbail proposal for go error handling
-
Swift Static Linux SDK
This melding of the sync and the async is actually kinda interesting to me. I know that at least in lots of environments, the sync and async paths are effectively separate for things like I/O[1]. I wondered (and still do for some cases) how Go handles this.
For those curious I looked at Windows and Linux, but not much else.
Linux: no io_uring support. There's debate on even whether to use it as people are discussing security implications[2]. It looks like (from perusing this issue, but could be wrong) AIO wasn't used.
Windows: it looks like they're using IOCP everywhere. Seems sensible enough.
General case: there seems to be an open issue regarding this[3].
[1]: For example, Windows has IOCPs, Linux has io_uring, FreeBSD has kqueue, POSIX has... POSIX AIO, etc.
[2]: https://github.com/golang/go/issues/31908
[3]: https://github.com/golang/go/issues/6817
-
Component Generation with Figma API: Bridging the Gap Between Development and Design
In today's fast-paced software development landscape, efficient workflows and clear responsibilities between development and design teams are crucial. One effective way to streamline these workflows is by automating component generation from design tools like Figma to code using powerful programming languages like Golang. This article will explore the process of converting Figma components to code, focusing on the clear differentiation of responsibilities between development and design teams.
- The Functional Programming Hiring Problem
-
A single ChatGPT mistake cost us $10k
> The Go database/sql package actually executes ROLLBACK in the SQL engine.
No: https://github.com/golang/go/blob/beaf7f3282c2548267d3c89441...
-
Go: Sentinel errors and errors.Is() slow your code down by 3000%
Nice write-up.
It's a shame that errors.Is is slow for general use, and at least some of that seems attributable to the Comparable change requiring reflection. Multi-errors seems to have bloated the switch. And of course the lack of a happy-path that was fixed in [1].
Since Go already has two ways of handling exceptional state: return or panic, it does feel like a stretch to also introduce a "not found" path too. All bets are off in tight inner loops, but I think as a general coding practice, it'll make the language (de facto) more complicated/ambiguous.
But my take away is that the question has been kicked off: can wrapped errors be made more efficient?
1. https://github.com/golang/go/commit/af43932c20d5b59cdffca454...
-
Fast Shadow Stacks for Go
I know that at least two engineers from the runtime team have seen the post in the #darkarts channel of gopher slack. One of them left a fire emoji :).
I'll probably bring it up in the by-weekly Go runtime diagnostics sync [1] next Thursday, but my guess is that they'll have the same conclusion as me: Neat trick, but not a good idea for the runtime until hardware shadow stacks become widely available and accessible.
[1] https://github.com/golang/go/issues/57175
What are some alternatives?
zig - General-purpose programming language and toolchain for maintaining robust, optimal, and reusable software.
v - Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
Lark - Lark is a parsing toolkit for Python, built with a focus on ergonomics, performance and modularity.
TinyGo - Go compiler for small places. Microcontrollers, WebAssembly (WASM/WASI), and command-line tools. Based on LLVM.
gcc
SDL - Simple Directmedia Layer
Nim - Nim is a statically typed compiled systems programming language. It combines successful concepts from mature languages like Python, Ada and Modula. Its design focuses on efficiency, expressiveness, and elegance (in that order of priority).
cosmopolitan - build-once run-anywhere c library
Angular - Deliver web apps with confidence 🚀
windmill - Open-source developer platform to turn scripts into workflows and UIs. Fastest workflow engine (5x vs Airflow). Open-source alternative to Airplane and Retool.
golang-developer-roadmap - Roadmap to becoming a Go developer in 2020