Commit graph

7 commits

Author SHA1 Message Date
Kim Alvefur
5b33f834fa util.paths: Optimize path joining with few arguments
A casual search suggests that the majority of paths.join() calls involve
only two arguments. This saves the creation of a table for up to 3
arguments.

Looks like 3x faster for 3 arguments or less, 5% slower when it uses the
array to concatenate.
2020-10-11 23:04:13 +02:00
Kim Alvefur
c900a5c544 util.paths: Don't treat path as pattern, fix traceback (thanks Menel87) 2019-11-08 19:25:57 +01:00
João Duarte
bb07c44d5a util.paths: Fixed file termination for package.cpath's extra path 2019-08-16 10:44:10 -07:00
João Duarte
cc182d0795 util.paths: Refactored a variable, to avoid shadowing 2019-08-01 09:29:18 -07:00
João Duarte
579bcb64d5 util.paths: Added the function 'complement_lua_path' 2019-08-01 09:12:28 -07:00
Kim Alvefur
090d1d01f4 util.paths: Add function for joining path segments 2014-11-08 12:28:49 +01:00
Kim Alvefur
084761b5ef core.configmanager: Move path utility functions into util.paths 2014-05-09 19:34:35 +02:00