Fasterer: Parallel assignment is slower

Parallel assignment is slower than sequential assignment.
Only got the low hanging fruit. There are some functions that
have multiple return values. Fixing this needs more refactoring.
This commit is contained in:
Reinier Balt 2015-08-19 15:12:52 +02:00
parent 9f81e1a5c3
commit 5092b388fe
4 changed files with 63 additions and 47 deletions

View file

@ -25,7 +25,8 @@ module ProjectsHelper
end
def project_next_prev_mobile
prev_project,next_project= "", ""
prev_project = ""
next_project = ""
prev_project = content_tag(:li, link_to_project_mobile(@previous_project, "5", @previous_project.shortened_name), :class=>"prev") if @previous_project
next_project = content_tag(:li, link_to_project_mobile(@next_project, "6", @next_project.shortened_name), :class=>"next") if @next_project
return content_tag(:ul, "#{prev_project}#{next_project}".html_safe, :class=>"next-prev-project")