Skip to main content

Home/ Python Programming/ Group items tagged functional

Rss Feed Group items tagged

reckoner reckoner

Parallelization on muli-CPU hardware? - comp.lang.python | Google Groups - 0 views

  •  > According to the fact that all Thread run on the same CPU (if i didn't  > understand wrong), i'm asking if python will suffer from the future  > multicore CPU. Will not python use only one core, then a half or a  > quarter of CPU ? It could be a serious problem for the future of python... I agree that it could potentially be a serious hindrance for cpython if "multiple core" CPUs become commonplace. This is in contrast to jython and ironpython, both of which support multiple-cpu parallelism. Although I completely accept the usual arguments offered in defense of the GIL, i.e. that it isn't a problem in the great majority of use cases, I think that position will become more difficult to defend as desktop CPUs sprout more and more execution pipelines. I think that this also fits in with AM Kuchling's recent musing/thesis/prediction that the existing cpython VM may no longer be in use in 5 years, and that it may be superceded by python "interpreters" running on top of other VMs, namely the JVM, the CLR, Smalltalk VM, Parrot, etc, etc, etc. http://www.amk.ca/diary/archives/cat_python.html#003382 I too agree with Andrew's basic position: the Python language needs a period of library consolidation. There is so much duplication of functionality out there, with the situation only getting worse as people re-invent the wheel yet again using newer features such generators, gen-exps and decorators.
reckoner reckoner

Psyco - Introduction - 0 views

  • In short: run your existing Python software much faster, with no change in your source. Think of Psyco as a kind of just-in-time (JIT) compiler, a little bit like what exists for other languages, that emit machine code on the fly instead of interpreting your Python program step by step. The difference with the traditional approach to JIT compilers is that Psyco writes several version of the same blocks (a block is a bit of a function), which are optimized by being specialized to some kinds of variables (a "kind" can mean a type, but it is more general). The result is that your unmodified Python programs run faster. Benefits 2x to 100x speed-ups, typically 4x, with an unmodified Python interpreter and unmodified source code, just a dynamically loadable C extension module. Drawbacks Psyco currently uses a lot of memory. It only runs on Intel 386-compatible processors (under any OS) right now. There are some subtle semantic differences (i.e. bugs) with the way Python works; they should not be apparent in most programs.
anonymous

Intermediate and Advanced Software Carpentry in Python - 4 views

  • try: import psyco psyco.full() except ImportError: pass
  • >>> def simple_cache(fn): ... cache = {} ... ... def new_fn(n): ... if n in cache: ... print 'FOUND IN CACHE; RETURNING' ... return cache[n] ... ... # otherwise, call function & record value ... val = fn(n) ... cache[n] = val ... return val ... ... return new_fn
enzojade62

Python Proficiency: Crafting a Digital Shopping Cart - 3 views

Are you ready to sharpen your Python programming skills with a practical and engaging assignment? In this blog post, we'll tackle the creation of a digital shopping cart, providing you with an oppo...

python programming developer pythonprogrammingassignmenthelp programmingassignmenthelp pythonassignmenthelp assignmenthelp education students university

started by enzojade62 on 16 Nov 23 no follow-up yet
« First ‹ Previous 41 - 46 of 46
Showing 20 items per page