News for hackers. Stuff that matters.
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by bee_rider on Monday January 16, 2023 @04:08PM (#34405487)
It is a shame these kind of knobs are rarely exposed on a laptop. Sometimes I throttle my laptop cpu down to like 800MHz-1.2GHz to save power/prevent the fan from going. But this makes Vim less responsive for certain events. What I’d actually like is normal behavior but with the turbo clock limited to like… I dunno, a second.
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by MikusR on Monday January 16, 2023 @04:18PM (#34405621)
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by jeffbee on Monday January 16, 2023 @04:29PM (#34405733)
In Linux you want powercap tools. You can tune all three parameters in terms of power and time constant, so you can do exactly what you suggest. You can change it on the fly without rebooting so you could have a ridiculous setup like mine where I have the power limits wired up to two unused buttons on my mouse.
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by bee_rider on Monday January 16, 2023 @05:26PM (#34406288)
Cunningham’d. Awesome, I’ll look into it, thanks.
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by bee_rider on Tuesday January 17, 2023 @01:50AM (#34409794)
Seems to work pretty well. I was initially confused — it seems the default on my system had the “long term” limit set to some very high value, which made my changes to the short term moot. Seems like an odd default but I’ll blame ASUS for that I guess.

Still slightly confused as to what exactly the “time window” means physically. With mine set to 1000us I still seem to get multiple seconds at full power. But it bumps down before the fan spins up so that seems good enough!

Looking forward to the inevitable realization tomorrow that this is going to make my computer unusable in zoom calls.

Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by tambourine_man on Monday January 16, 2023 @06:28PM (#34406992)
If Vim isn’t responsive in a machine with hundreds of MHz something is very wrong with your setup. Vim was fast on machines with dozens of MHz. Either a bad terminal emulator or some plugin making it slow, I’d guess.
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by pmontra on Monday January 16, 2023 @06:36PM (#34407057)
Not vim but vi, it was fast enough for me on machines with less than a dozen MHz, probably high single digit.

However we have many more layers now. I had a 80x24 serial tty exchanging ASCII characters with the computer back then.

Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by gonzo on Monday January 16, 2023 @11:31PM (#34409158)
Yes, but at what baud?
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by pmontra on Tuesday January 17, 2023 @03:35AM (#34410373)
Probably 4 digits. I was young and not a very fast typer yet. Zenith green phosphor terminals with a repeat key. This one or very similar https://commons.wikimedia.org/wiki/File:Zenith_Z-19_Terminal...

According to https://vt100.net/heath/z19-om.pdf it can do 110 to 9600 baud. It was connected to some Z8000 based Onyx server. It was generally good but incredibly slow when more than four or five of us were compiling code for the tests at university class. Pascal, Berkeley p system or something with a similar name.

Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by pclmulqdq on Monday January 16, 2023 @06:34PM (#34407041)
It's probably a plugin. A lot of them are very slow.
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by 3np on Tuesday January 17, 2023 @04:18AM (#34410586)
As far as I understand, neovim has multithreading where vim doesn't here, making heavy and bad plugins have less impact.
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by bee_rider on Monday January 16, 2023 @07:04PM (#34407304)
So there are two problems I guess, user-based and technical.

User problem: since I use Vim for everything, my expectations as far as responsiveness goes are probably not calibrated correctly. It is almost always very good, so the moments of badness are noticeable. The user (me) is unreasonably picky.

Technical: LaTeX syntax highlighting. It is I’m pretty sure, generally known to be a bit of a pain. Lots of nested environments that can go back dozens of lines and change how commands are interpreted. It is happy in a decent (not huge or anything) sized Fortran code, so I think config is mostly OK. Maybe I should look around and see if there’s a nice LaTeX plugin out there.

Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by tambourine_man on Monday January 16, 2023 @07:21PM (#34407465)
I think you found the culprit. Syntax highlighters are notoriously slow.

You have every right to have high expectations for performance with Vim

Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by celrod on Tuesday January 17, 2023 @04:29AM (#34410644)
Perhaps tree sitter can help the syntax highlighting? https://github.com/latex-lsp/tree-sitter-latex
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by lhl on Tuesday January 17, 2023 @12:15PM (#34415278)
Related, but Neovim has experimental treesitter support (w/ Latex) built in these days: https://github.com/nvim-treesitter/nvim-treesitter

Depending on how hard you push it, Neovim can also be noticeably faster than Vim (notably Lua/LuaJIT being much faster than VimScript)

Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by pletnes on Tuesday January 17, 2023 @05:51AM (#34411096)
Some vim plugins are slow. Fortran highlighting used to be super slow for certain use cases 10 years ago. I think there were some bad regexes. Latex documents are often long (cf other code) and the syntax rules are complex.
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by ObscureScience on Monday January 16, 2023 @07:05PM (#34407310)
It's not vim, but the OS/graphical system that you are most likely using underneath. While having Firefox/Chromium open for reference to what you are working on.
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by 3np on Tuesday January 17, 2023 @04:16AM (#34410577)
Specifically worth comparing terminal emulator performance. I noticed that for example (not surprisingly I guess) alacritty has been both the worst and the best depending on the setup.
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by pengaru on Tuesday January 17, 2023 @02:38AM (#34410052)
There are definitely some pathological situations where vim becomes unresponsive even on a beefy box. Usually there's exceptionally long lines of text involved.

Furthermore there's the whole intentional delay on ESC exit from modes like an aborted search query... that can make it feel unresponsive but it's just a timeout. Try it, hit '/' in vim, then ESC to abort the search, count a full second of unresponsiveness.

Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by lhl on Tuesday January 17, 2023 @12:39AM (#34409498)
If you're running on Linux, almost all of this is completely configurable using ryzenadj for AMD laptops or powercap and thermald for Intel chips. Here's a document on how you might go about adjusting this w/ powercap: https://github.com/junaruga/framework-laptop-config/wiki/Imp...

For anyone looking for a good summary of the knobs available for AMD: https://github.com/FlyGoat/RyzenAdj/wiki/Renoir-Tuning-Guide

Or for Intel: https://github.com/lhl/linuxlaptops/wiki/2022-Framework-Lapt...

Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by bayindirh on Tuesday January 17, 2023 @04:09AM (#34410544)
Or you can always fine tune the on-demand governor to gracefully speed up the processor as the load increases and keep it there for a second or so and bring it down.
Re:Intel Core i9-13900T 35W CPU Outperforms 125W i9-12900K by lhl on Tuesday January 17, 2023 @11:59AM (#34415019)
Modern Linux kernels load the `intel_pstate` frequency driver by default these days which has it's own governors that don't quite act the same way as generic ones, but you can control scaling for them w/ the EPB/EPP hints.

* https://www.kernel.org/doc/html/v4.12/admin-guide/pm/intel_p...

* https://manpages.ubuntu.com/manpages/kinetic/en/man8/x86_ene...

* https://wiki.archlinux.org/title/CPU_frequency_scaling