what's causing the M1 CPU …

0 0
Read Time:25 Second



Why use/not use ripgrep:

#ripgrep #vscode

💻NativeScript training courses —
(Take 15% off any premium NativeScript course by using the coupon code YT2020)
👕👚iScriptNative Gear –

— — — — — — — — —

❤️ SUBSCRIBE TO MY YOUTUBE CHANNEL 📺

Click here to subscribe:

— — — — — — — — —

🏫 FREE COURSES

NativeScript Core Getting Started Guide (Free Course) –

NativeScript with Angular Getting Started Guide (Free Course) –

Upgrading Cordova Applications to NativeScript (Free Course) –

— — — — — — — — —

📱LET’S CONNECT ON SOCIAL MEDIA

ALEX ON TWITTER:
NATIVESCRIPTING ON TWITTER:

source

This post was automatic generated with this wp-automatic-plugin

Happy
Happy
0 %
Sad
Sad
0 %
Excited
Excited
0 %
Sleepy
Sleepy
0 %
Angry
Angry
0 %
Surprise
Surprise
0 %
How to Integrate Stripe Paymen… Previous post How to Integrate Stripe Paymen…
13/19 Adding a custom controll… Next post 13/19 Adding a custom controll…

29 thoughts on “what's causing the M1 CPU …

  1. I can't believe you lived w/o ripgrep either, so awesome! –no-messages can be very useful if you don't care about folders you don't have permissions for!

  2. Just be careful with rg, die to its recursive search nature, one malformed regex can send it into an infinite loop. Most of the time isn't even obvious, but suddenly VS Code stops responding

  3. The frist tool You pasted was egrep and not ripgrep. It was a benchmark to show how slow some other greps are in comparison.
    A command line junky knows these tools by heart 😉
    And these tools are more IO bound than cpu bound.
    That’s why it’s also red, it’s the read() syscalls and the mmap () to allocate memory for the files. It reads them in large chunks to reduce syscalls. But it’s so fast it still caused lots of syscalls in a short time.

  4. Yep, search is CPU intensive. When writing software, the maxim of optimisation is "Don't do premature optimisation". Only once you've written some code that is slower than is ideal for the use case, should you worry about optimisation (with some caveats), and run a profiler over it. The only time I've had to actually bother with a profiler, it found a part of my code that involved searching. I realised there was a much better way around what I was trying to do, changed that part of the code, problem solved. ripgrep is doing a massive search on non-indexed text, and yup, it's going to be slow and CPU intensive.

  5. Number of cores (threads) used is determined by the –threads NUM argument to rg
    The approximate number of threads to use. A value of 0 (which is the default) causes ripgrep to choose the thread count using heuristics.

  6. 2:24 Hmmm…. did you just copy a random command and ran it without knowing what it was? That's a bit risky 😬 – BTW that command is in fact so you can compare a different grep (GNU grep) and see how slow it is vs rg (ie, that command will not show rg in the activity monitor since it isn't rg at all – that being the point)

  7. Can you please explain me what you have 20 Cores in monitor? If M1 Pro has 8 Performance Cores and 2 Efficiency Cores? It means that M1 Pro and M1 Ultra has Hyperthreading activate?

  8. Search is either binary or sequential, divide & conquer or iterative so it's naturally CPU intensive and does not take advantage of multi-threading. Maybe I'm not up to date but I don't believe search can be processed in parallel vector form… so this is to be expected.

  9. 5:45 Did you know that you can go to your home directory with just a command "cd"?

    Anyways, interesting video as always:)

    EDIT: command from "cd " to "cd"

Leave a Reply

Your email address will not be published. Required fields are marked *

error: Content is protected !!