Commit 2e4930b3 authored by Yash Ladha's avatar Yash Ladha Committed by Node.js GitHub Bot
Browse files

src: reduced substring calls

Reduced the number of substring calls by 1 as it is a linear time
complexity function. Thus having a larger path might lead to decrease in
performance. Also removed unnecessary string allocation happening in the
block.

PR-URL: https://github.com/nodejs/node/pull/34808


Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
Reviewed-By: default avatarJoyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: default avatarFranziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: default avatarAntoine du Hamel <duhamelantoine1995@gmail.com>
parent 4cfa5dfc
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment