Optimal decision depends on the circumstances, including reliability of the police/judicial process, your access to a good lawyer, and your personal situation.
If you're a reasonably wealthy, respectable-looking professional traveling to the U.S. or Western Europe, your best bet is to alert the authorities immediately, not make any extensive statements, and contact a good lawyer.
If you're a backpacker arriving to, say, SE Asia, disposing the contraband in a toilet seems like a much better option. If you report it, the police will be interested either in a sizable bribe or to show off a flashy conviction without doing too much work. You're at hand and make a good target, while apprehending the real criminals difficult to impossible. The real criminals may even be paying off some of the cops (or they may be senior cops themselves). Once you successfully dispose of the contraband, I think your next priority would be to turn right around and get out of the country ASAP.