It's definitely illegal
That said you can also fall foul of a road side drug swab many days after taking them. You could smoke a joint or a line on a Friday and fail a police drug swab on Monday.
So 'effectively' you ain't driving under any influence but you'd still lose your licence or worse get sent down for death by dangerous driving under the influence of drugs. The fact it was 4 days ago is irrelevant. I imagine so many people could fall foul of this after a weekend.
You heaven forbid kill someone in a crash you'll get drink and drug tested. Also cars are checked for undeclared mods for all those driving around with remaps etc.
Simply not worth it. Then again if you dabble then get a job where its fine like a rock star or DJ