From 214d02040e1c46b8cac47451bf2f0e2fc15a3e0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A1=D0=BA=D0=BE=D0=B2=D0=BE=D1=80=D0=BE=D0=B4=D0=B0=20?= =?UTF-8?q?=D0=9D=D0=B8=D0=BA=D0=B8=D1=82=D0=B0=20=D0=90=D0=BD=D0=B4=D1=80?= =?UTF-8?q?=D0=B5=D0=B5=D0=B2=D0=B8=D1=87?= Date: Wed, 20 May 2015 22:26:37 +0300 Subject: [PATCH] util: speed up common case of formatting string PR-URL: https://github.com/nodejs/io.js/pull/1749 Reviewed-By: Ben Noordhuis Reviewed-By: Jeremiah Senkpiel --- lib/util.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/util.js b/lib/util.js index c00b4ad2cc7..401d55bbe82 100644 --- a/lib/util.js +++ b/lib/util.js @@ -13,6 +13,8 @@ exports.format = function(f) { return objects.join(' '); } + if (arguments.length === 1) return f; + var i = 1; var args = arguments; var len = args.length;