Trong mã nguồn Carbon, thay .resize() bằng .reserve() giảm thời gian cấp phát bộ nhớ từ 194 ms xuống 3.3 ms, mang lại tăng tốc đáng kể cho các đơn vị dịch lớn. #Performance #CarbonLang #C++ #TốiƯuHóa #LậpTrình

https://github.com/carbon-language/carbon-lang/pull/6656

Optimize ValueStore::Reserve to use lazy allocation by wilkolbrzym-coder · Pull Request #6656 · carbon-language/carbon-lang

Changed ValueStore::Reserve to use chunks_.reserve instead of chunks_.resize. This avoids eager construction of Chunk objects (which allocate 4KB buffers) when reserving capacity. Chunks are now in...

GitHub

#carbonlang there we go https://codeberg.org/pseyfert/advent-of-code/commits/branch/main/2025/02/carbon first star for day 2.

learned
- how to make bazel tell me how the linker gets called
- std::optional can be shared between carbon and cpp
- maybe advent of code is about dealing with real world projects where half way through the project all requirements and goals and boundary conditions change and i'm not going to do the second half … stupid elves with their product IDs.

#adventofcode

Cookie monster!

#carbonlang yes, i know the language and toolchain are WIP. no, I didn't check what's supported and what isn't before hacking. chances are i didn't discover anything unknown.

https://codeberg.org/pseyfert/advent-of-code/src/branch/main/2025/02/carbon/carbon_src/day2.carbon#L58 nice. calling a c++ function that takes a string_view from carbon with a literal compiles! sadly segfaults at run time.

also the linker https://codeberg.org/pseyfert/advent-of-code/src/branch/main/2025/02/carbon/include/day2.h#L19 makes me add virtual destructors everywhere, and then the destructors segfault.

1/

Cookie monster!

https://codeberg.org/pseyfert/advent-of-code/src/branch/main/2025/01/carbon/carbon_src/day1.carbon not the most 2-language interoperable code i've written for advent of code, i'm not even sure what `carbon format` was doing there … but technically that ticks off an item of my bucket list. #carbonlang
Cookie monster!

А что там с #carbonlang? Или Google решила не развивать его дальше из-за #golang?
Today I'm trying #carbonlang again

First public demo of #CarbonLang with C++ interop was by none other than @shanselman, running on a Commodore64 emulator, at #CppNorth today. During a talk about empathy. It both was kind of perfect given the context that has led to this project.

But it also was far from the best part of an amazing talk, huge thanks to Scott for the great talk and great message.

The recent announcement about #TheCVEFoundation that was formed by some concerned members of the MITRE CVE program reminds me - The #C++ needs a foundation that is disconnected from the #ISO. I have mentioned this before and I learned about the #CarbonLang by @chandlerc. May be the #MITRE #CVE program near-fiasco could be the trigger for the #CPPLangFoundation?

#CarbonLang just started a new regular update pattern that folks might find easier to follow:

- "Last week in Carbon" posts summarizing things happening across the project
- Every other month a live "demo" meeting:
- Demoing newly working parts of toolchain or a currently active design discussion

Can check out the first "Last Week" post: https://github.com/carbon-language/carbon-lang/discussions/5259

Or the proposal for the new structure: https://github.com/carbon-language/carbon-lang/blob/trunk/proposals/p5233.md

2025-04-07 — Last Week in Carbon · carbon-language carbon-lang · Discussion #5259

Introduction Welcome to the new Last Week in Carbon posts! This is a new format we're using to summarize activity across the Carbon project in the last week. You can find all the detail in the prop...

GitHub

Super true.

This is also roughly my primary framing in interpreting #CarbonLang's goals around performance -- it's all about getting very close to an abstract model of what an optimizing compiler needs.

https://mastodon.social/@mcc/114293106769116224