5 ms·
As someone with a laptop like this, dev work in certain situations (compiling heavy code, like systems languages) is essentially unworkable. The ram is actually
by sodality2 5y ago
As someone with a laptop like this, dev work in certain situations (compiling heavy code, like systems languages) is essentially unworkable. The ram is actually 3.33 GB (memory is shared with GPU) and the CPU's are often dual-core. Visual studio code escapes alright (somehow), so maybe for light web dev work. But when my rust code takes 8 minutes to compile and 20 seconds on a PC, it almost makes it easier to compile once on my desktop and rsync it over (so subsequent compiles are faster b/c incremental compilation). This is just the reality of a low end system, it's competent at web browsing and note taking, and surprisingly I can last about 6-8 hours on a ~$400 laptop. I certainly didn't expect a compiling powerhouse, but I can literally install ripgrep in 26 seconds and it takes about 7 or 8 minutes on the laptop.
TLDR: Don't use with systems languages. Rust takes ages to compile and I have almost switched to learning go just because of it. Of course, I am expecting way too much out of a laptop (systems programming? really?) but I didn't expect it to be so terribly slow.
- zozbot234 5y ago8 minutes for a first compile on a non-trivial code base (ripgrep) is not that bad. Sure, you might call it a "low end system" but these performance choices can also save on battery use, which helps when coding on the go.
- jcelerier 5y agoFrom what I could find, ripgrep is 40kloc... That means roughly 83 lines of code compiled per second. I'm sure there are languages on the PDP-11 (a 1.25 mhz machine) that compiled faster than that.
- burntsushi 5y agoUh... No. You're off by an order of magnitude. $ cargo vendor $ tokei vendor/ crates/ -t Rust -s code --exclude winapi ------------------------------------------------------------------------------- Language Files Lines Code Comments Blanks ------------------------------------------------------------------------------- Rust 1248 615700 493777 83201 38722 And 8 minutes for compiling ripgrep sounds crazy. My i3 Mac Mini with 16GB of RAM compiles ripgrep from scratch in 1m48s.
- sodality2 5y agoWell, my laptop is AMD Athlon 3050U with ~3.33GB of ram ("4GB" but shared with GPU). Ripgrep definitely took that long to install last time I installed it. Dual core + ~3GB of ram, I can see 8 minutes being somewhat within reach. perhaps some aggro power throttling as well?
- jcelerier 5y agoI was on my phone and trusted the Google results of "ripgrep sloc", thanks for the correction ! What takes so much code in the ripgrep codebase ? I am developing a cross-platform GUI app with audio, video and network features and it's not even 500k lines
- jcelerier 5y agohmm, but I just cloned the ripgrep repo and it tells me 28k loc ? $ cloc . 193 text files. 170 unique files. 114 files ignored. github.com/AlDanial/cloc v 1.88 T=1.88 s (73.3 files/s, 25634.5 lines/s) -------------------------------------------------------------------------------- Language files blank comment code -------------------------------------------------------------------------------- Rust 85 3984 9128 28104 Markdown 19 923 0 3637 Python 2 194 313 830 TOML 13 42 11 342 YAML 3 30 60 313 Bourne Shell 8 22 9 130 zsh 1 16 14 67 Bourne Again Shell 2 11 22 28 Ruby 1 4 0 19 Dockerfile 4 4 0 12 -------------------------------------------------------------------------------- SUM: 138 5230 9557 33482 -------------------------------------------------------------------------------- isn't the crates thing counting dependencies too ? which would be weird, if so why not also count the libc or kernel32.dll source code ?