Is && better than AND Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
shanshans
Posts: 27
Joined: 13 Dec 2015, 08:10

Is && better than AND

Post by shanshans » 20 Jun 2022, 00:08

I read a page(not ahk) about && and ||
They mention && is faster because when the condition of the left side is not meet , it will stop/break instantly.
But AND will read/load? the complete condition no matter what.
I guess || are kind of the same to OR

Are they correct ? Should we replace AND to && ? thk :)

Rohwedder
Posts: 7774
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Is && better than AND  Topic is solved

Post by Rohwedder » 20 Jun 2022, 00:56

Hallo,
Short-circuit evaluation is used for all of them to improve the performance!
https://www.autohotkey.com/docs/Variables.htm#and
My opinion, AND and OR are visually nicer.

Post Reply

Return to “Ask for Help (v1)”