Re: GC is very expensive: am I doing something wrong?
In article , Stefan Behnel wrote: >Lawrence D'Oliveiro, 22.03.2010 00:36: >> Terry Reedy wrote: >>> No one has discovered a setting >>> of the internal tuning parameters for which there are no bad patterns >>> and I suspect there are not any such. This does not negate Xavier's >>> suggestion that a code change might also solve your problem. >> >> Could it be that for implementing a structure like a trie as the OP is, >> where a lot of CPU cycles can be spent manipulating the structure, a high- >> level language like Python, Perl or Ruby just gets in the way? > >I would rather say that the specific problem of the trie data structure is >that it has extremely little benefit over other available data structures. Not true. >There may still be a couple of niches where it makes sense to consider it >as an alternative, but given that dicts are so heavily optimised in Python, >it'll be hard for tries to compete even when written in a low-level language. It depends. If your data is not in nearly sorted order, trees are some of the best mechanisms available. >Remember that the original use case was to load a dictionary from a text >file. For this use case, a trie can be very wasteful in terms of memory and >rather CPU cache unfriendly on traversal, whereas hash values are a) rather >fast to calculate for a string, and b) often just calculated once and then >kept alive in the string object for later reuse. You still have to walk the bucket in a hash map/table. Performance may be orders of magnitude worse than for trees. >> My feeling would be, try to get the language to do as much of the work for >> you as possible. If you canât do that, then you might be better off with a >> lower-level language. > >I agree with the first sentence, but I'd like to underline the word 'might' >in the second. As this newsgroup shows, very often it's enough to look for >a better algorithmic approach first. > >Stefan > -- You want to know who you are? http://oshosearch.net/Convert/search.php Most Osho books on line: http://oshosearch.net -- http://mail.python.org/mailman/listinfo/python-list
FW: Troubleshoot python app launch
From: [1]Tan Jane Sent: Wednesday, 11 August 2021 7:48 PM To: [2][email protected] Subject: Troubleshoot python app launch Hi, I encountered attached screenshot issue while launching the python application downloaded for windows. Please advice on the above. Thanks, Jane Sent from [3]Mail for Windows 10 References Visible links 1. mailto:[email protected] 2. mailto:[email protected] 3. https://go.microsoft.com/fwlink/?LinkId=550986 -- https://mail.python.org/mailman/listinfo/python-list
freeze question..
I have the code that import the xml dom module: import xml.dom.minido that works OK. But the freeze version keeps getting me this error: ImportError: No module named dom I run freeze this way: freeze -q -E my.py any idea and suggestion ? thanks tan -- http://mail.python.org/mailman/listinfo/python-list
Please Unsubscribe
-- https://mail.python.org/mailman/listinfo/python-list
Error installing python on Windows
Hello all I am new to python. Trying to install Python and encountered this error message : "The program can't start because api-ms-win-crt-runtime-I1-1-0.dll is missing from your computer." Tried to repair and reinstall Python however i may have missed out some installation. What should I do to resolve this issue? Thanks for your help! -- https://mail.python.org/mailman/listinfo/python-list
Python script and C++
Hi all, I am new to python and currently I am working on a traffic simulation which I plan to define the various agents using scripting. It's kind of like scripting for non-playable character in games. I am thinking of using python for this but I am concerned with running time. Is scripting a lot slower compared to direct implementation in C++? Does compiling the script help in any way? Also, can anyone recommend me a book that covers python in general as well as C++ binding? Thanks. Thuan Seah Tan -- http://mail.python.org/mailman/listinfo/python-list
Question in VB DLL COM event in Delphi Programming
Dear Sir, I have a question regarding Delphi COM programming. I have a VB DLL (ActiveX COM DLL) and this DLL contain 2 classes, one is for normal client function calling, and the other one is events raised by this DLL to notify the client. Now, I would like to incorporate this DLL into Delphi (bind the DLL into Delphi program) so that when the events raised by this DLL, it can be capture in the Delphi program. I am new in Delphi and I would like to need your help or advice on this integration. I could send you the sample code in VB and the VB DLL if you need. Thanks in advance. Best regards, Tan, Yih Hung -- http://mail.python.org/mailman/listinfo/python-list
