Template:Eff note: Difference between revisions

From Rosetta Code
Content added Content deleted
(Created page with '<div class="messagebox" style="text-align:center"><small>Though this task should probably be done in {{{1}}} using <code>{{{2}}}</code>, the following code demonstrates a particu…')
 
(Use "method" instead of "algorithm" to apply to non-algorithmic examples)
Line 1: Line 1:
<div class="messagebox" style="text-align:center"><small>Though this task should probably be done in {{{1}}} using <code>{{{2}}}</code>, the following code demonstrates a particular algorithm that may be less efficient, but fits better with other examples on this page.</small></div><noinclude>
<div class="messagebox" style="text-align:center"><small>Though this task should probably be done in {{{1}}} using <code>{{{2}}}</code>, the following code demonstrates a particular method that may be less efficient, but fits better with other examples on this page.</small></div><noinclude>


This is meant to replace (possibly pretentious-sounding) notes on examples that highlight the use of more efficient built-in functions to accomplish tasks that ask for a particular algorithm to be used. The language is given as the first argument to this template, and a function name or short code snippet is given as the second argument.
This is meant to replace (possibly pretentious-sounding) notes on examples that highlight the use of more efficient built-in functions to accomplish tasks that ask for a particular algorithm to be used. The language is given as the first argument to this template, and a function name or short code snippet is given as the second argument.

Revision as of 20:05, 31 August 2009

Though this task should probably be done in {{{1}}} using {{{2}}}, the following code demonstrates a particular method that may be less efficient, but fits better with other examples on this page.

This is meant to replace (possibly pretentious-sounding) notes on examples that highlight the use of more efficient built-in functions to accomplish tasks that ask for a particular algorithm to be used. The language is given as the first argument to this template, and a function name or short code snippet is given as the second argument.

Example use:

For the merge sort task in Java, someone may add a note reading "But none of this is necessary because Collections.sort(List) will use the merge sort when the list is long enough that it is efficient to use it." This note may be replaced with {{eff note|Java|Collections.sort(List)}}.

Try not to put too much text in this box if you want to add to it. It's really just for a little note.



This is a template. There are many others. See Category:RCTemplates for a complete list of templates.