A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-list/2005-September/333292.html below:

Why is map() preferable in this case?

Why is map() preferable in this case? Why is map() preferable in this case?Delaney, Timothy (Tim) tdelaney at avaya.com
Mon Sep 19 18:10:28 EDT 2005
Devan L wrote:

> Map is in C. It's faster, but not as clear. Some people do think
> map(f, L) is nicer though. Google is your friend here, if you want to
> read the old arguments.

map() will be faster if the function you are calling from map() is
*also* in coded in C. If it's coded in python, then the generator
expression will probably be faster.

Use whatever reads better to you. Look at optimising when you need to,
and not before.

Tim Delaney

More information about the Python-list mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4