{"action":"created","issue":{"url":"https://api.github.com/repos/less/less.js/issues/2501","labels_url":"https://api.github.com/repos/less/less.js/issues/2501/labels{/name}","comments_url":"https://api.github.com/repos/less/less.js/issues/2501/comments","events_url":"https://api.github.com/repos/less/less.js/issues/2501/events","html_url":"https://github.com/less/less.js/issues/2501","id":60787730,"number":2501,"title":"use global regexes (cached) for small speed improvement","user":{"login":"lukeapage","id":309321,"avatar_url":"https://avatars.githubusercontent.com/u/309321?v=3","gravatar_id":"","url":"https://api.github.com/users/lukeapage","html_url":"https://github.com/lukeapage","followers_url":"https://api.github.com/users/lukeapage/followers","following_url":"https://api.github.com/users/lukeapage/following{/other_user}","gists_url":"https://api.github.com/users/lukeapage/gists{/gist_id}","starred_url":"https://api.github.com/users/lukeapage/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukeapage/subscriptions","organizations_url":"https://api.github.com/users/lukeapage/orgs","repos_url":"https://api.github.com/users/lukeapage/repos","events_url":"https://api.github.com/users/lukeapage/events{/privacy}","received_events_url":"https://api.github.com/users/lukeapage/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/less/less.js/labels/Feature%20Request","name":"Feature Request","color":"fe9400"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":40,"created_at":"2015-03-12T08:52:09Z","updated_at":"2015-03-27T20:26:33Z","closed_at":null,"body":"I wonder if this will help with speed given how much we use regex's\r\n\r\nhttp://jsperf.com/regex-caching-lp"},"comment":{"url":"https://api.github.com/repos/less/less.js/issues/comments/87078690","html_url":"https://github.com/less/less.js/issues/2501#issuecomment-87078690","issue_url":"https://api.github.com/repos/less/less.js/issues/2501","id":87078690,"user":{"login":"seven-phases-max","id":5304376,"avatar_url":"https://avatars.githubusercontent.com/u/5304376?v=3","gravatar_id":"","url":"https://api.github.com/users/seven-phases-max","html_url":"https://github.com/seven-phases-max","followers_url":"https://api.github.com/users/seven-phases-max/followers","following_url":"https://api.github.com/users/seven-phases-max/following{/other_user}","gists_url":"https://api.github.com/users/seven-phases-max/gists{/gist_id}","starred_url":"https://api.github.com/users/seven-phases-max/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/seven-phases-max/subscriptions","organizations_url":"https://api.github.com/users/seven-phases-max/orgs","repos_url":"https://api.github.com/users/seven-phases-max/repos","events_url":"https://api.github.com/users/seven-phases-max/events{/privacy}","received_events_url":"https://api.github.com/users/seven-phases-max/received_events","type":"User","site_admin":false},"created_at":"2015-03-27T20:26:33Z","updated_at":"2015-03-27T20:26:33Z","body":">I think @lukeapage hit the nail on the head with the scopes involved in mixin call evaluation.\r\n\r\nIt's the problem of the language. I don't think @lukeapage or anyone else can do something about this, i.e. of course there can be some performance improvement tricks here and there, but nothing can cancel the whole picture: all this stuff just has to be re-evaluated in each scope because every scope may have different variables and mixins that may change the behaviour of the mixin call/match.\r\n\r\n(Meanwhile [there's way](http://stackoverflow.com/questions/26435049) to \"iterate\" over a list w/o any loops at all... It's just has to be different list not one of a variable ;) (of course since this method is also mixin-based it probably can't be as fast as dedicated JS-function)."}}