Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > de.comp.lang.python > #4369
| Path | csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | Thomas Güttler <guettliml@thomas-guettler.de> |
| Newsgroups | de.comp.lang.python |
| Subject | [Python-de] Schleifeninhalte auf mehrere CPUs zu verteilen |
| Date | Thu, 7 Apr 2016 15:48:04 +0200 |
| Lines | 38 |
| Message-ID | <mailman.31.1460036887.2253.python-de@python.org> (permalink) |
| References | <57066514.2010806@thomas-guettler.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| X-Trace | news.uni-berlin.de rUiV8zHJgOFvpIHELBz/cQ+VQLGaD7sQLI/8nRcEv9Qg== |
| Return-Path | <guettliml@thomas-guettler.de> |
| X-Original-To | python-de@python.org |
| Delivered-To | python-de@mail.python.org |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 |
| X-BeenThere | python-de@python.org |
| X-Mailman-Version | 2.1.21 |
| Precedence | list |
| List-Id | Die Deutsche Python Mailingliste <python-de.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-de>, <mailto:python-de-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-de/> |
| List-Post | <mailto:python-de@python.org> |
| List-Help | <mailto:python-de-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-de>, <mailto:python-de-request@python.org?subject=subscribe> |
| X-Mailman-Original-Message-ID | <57066514.2010806@thomas-guettler.de> |
| Xref | csiph.com de.comp.lang.python:4369 |
Show key headers only | View raw
Am 06.04.2016 um 21:06 schrieb Dr. Volker Jaenisch:
> Servus Thomas!
...
> Ich mache seit mehr als 20 Jahren Performance-Optimierung von Code in
> Python.
>
> Das genannte Beispiel
>
> connection = get_db_connection()
> for item in my_iterator:
> push_item_to_db(item, connection)
>
> und der Vorschlag wegen der Rechenzeit für das teure Öffnen der
> DB-Connection die Syntax des Interpreters ändern zu wollen
> ist absurd. Es mag ja wenige akademische Spezialfälle geben in denen so
> etwas evtl. weniger Rechenzeit benötigt. In "real world" Szenarien
> hat man sowieso nicht eine DB-Verbindung sondern einen Pool von
> DB-Verbindungen, da wirkliche Performance heutzutage nur mit
> Parallelisierung erreichbar ist.
> Es ist also viel interessanter eine Schleife und deren Inhalte auf
> mehrere CPUs zu verteilen als Corner-Cases am Anfang der Schleife zu
> optimieren.
Du hast Recht. Die Schleifeninhalte auf mehrere CPUs zu verteilen ist eine geniale Sache.
zwei Fragen:
1. Wie wünscht du dir die Syntax für Otto-Normal-Programmieren?
2. Wie könnte die Implementierung aussehen?
Gruß,
Thomas
--
Thomas Guettler http://www.thomas-guettler.de/
Back to de.comp.lang.python | Previous | Next | Find similar
[Python-de] Schleifeninhalte auf mehrere CPUs zu verteilen Thomas Güttler <guettliml@thomas-guettler.de> - 2016-04-07 15:48 +0200
csiph-web