Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.052 X-Spam-Evidence: '*H*': 0.90; '*S*': 0.00; 'subject:text': 0.05; 'debug': 0.07; 'debugging': 0.07; 'needed,': 0.07; 'suppose': 0.07; "ain't": 0.09; 'debugging.': 0.09; 'key.': 0.09; 'may,': 0.09; 'yeah,': 0.09; 'subject:question': 0.10; 'times,': 0.14; 'changes': 0.15; '"running': 0.16; '90s,': 0.16; 'benefit.': 0.16; 'caches': 0.16; 'here).': 0.16; 'opposite': 0.16; 'presume': 0.16; 'programmer,': 0.16; 'rebuild': 0.16; 'through,': 0.16; 'sat,': 0.16; 'wrote:': 0.18; '(not': 0.18; 'code.': 0.18; 'trying': 0.19; 'fit': 0.20; 'feb': 0.22; 'code,': 0.22; 'memory': 0.22; 'manual': 0.22; 'header:User-Agent:1': 0.23; '"you': 0.24; 'refers': 0.24; 'question': 0.24; 'sort': 0.25; 'changes,': 0.26; 'nearly': 0.26; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'external': 0.29; 'on,': 0.29; '[1]': 0.29; 'am,': 0.29; 'dos': 0.30; 'matching': 0.30; 'needed.': 0.30; "i'm": 0.30; 'code': 0.31; 'that.': 0.31; 'usually': 0.31; 'about.': 0.31; 'though.': 0.31; 'file': 0.32; 'run': 0.32; 'worked': 0.33; 'running': 0.33; 'entirely': 0.33; 'level.': 0.33; 'not.': 0.33; 'older': 0.33; 'sense': 0.34; 'core': 0.34; 'could': 0.34; "can't": 0.35; 'anywhere': 0.35; 'but': 0.35; 'version': 0.36; 'disk': 0.36; 'largely': 0.36; 'opposed': 0.36; 'ram': 0.36; 'sat': 0.36; 'done': 0.36; "didn't": 0.36; 'possible': 0.36; 'half': 0.37; 'virtual': 0.37; 'application': 0.37; 'project': 0.37; 'easily': 0.37; 'performance': 0.37; 'sometimes': 0.38; 'generic': 0.38; 'today?': 0.38; 'to:addr:python-list': 0.38; 'files': 0.38; 'that,': 0.38; 'aspects': 0.39; 'quote': 0.39; 'though,': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'either': 0.39; 'how': 0.40; 'dave': 0.60; 'is.': 0.60; 'tell': 0.60; 'lower': 0.61; 'full': 0.61; 'new': 0.61; 'took': 0.61; "you're": 0.61; 'further': 0.61; 'first': 0.61; 'back': 0.62; 'making': 0.63; 'term': 0.63; 'skip:n 10': 0.64; 'places': 0.64; 'provide': 0.64; 'more': 0.64; 'charset:windows-1252': 0.65; 'world': 0.66; 'here': 0.66; 'benefit': 0.68; 'received:74.208': 0.68; 'home': 0.69; 'hour': 0.70; 'apart': 0.72; 'physical': 0.72; 'funny': 0.74; 'hey,': 0.75; 'yourself': 0.78; 'savings': 0.81; '2015': 0.84; 'amount.': 0.84; 'complexity': 0.84; 'gps': 0.84; 'onboard': 0.84; 'ram,': 0.84; 'routines': 0.84; 'angel': 0.91; 'controller': 0.91; 'instant': 0.97 Date: Fri, 27 Feb 2015 10:24:55 -0500 From: Dave Angel User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Newbie question about text encoding References: <201502241620.t1OGKf4n002146@fido.openend.se> <54ECB134.5090304@davea.name> <201502241945.t1OJjshO013092@fido.openend.se> <201502241957.t1OJvrJS015604@fido.openend.se> <00fbd940-52f6-44e2-bf08-b9f35c12e73f@googlegroups.com> <54efc2c8$0$12986$c3e8da3$5496439d@news.astraweb.com> <54f00787$0$12979$c3e8da3$5496439d@news.astraweb.com> <54f05aff$0$12980$c3e8da3$5496439d@news.astraweb.com> <54F078FD.5030801@davea.name> In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:PqDdVsHuj0GZWgWm9AlBD7U6avxJCN5FgOjw1CxaP1t IcCLGgw3jlXD9PtYU2HDYFO/tHS/+guJe15kHdshvPGV8TGiCC 81WTiPuNZ/XrV0rR2JrN7shq+BoWIRVD3T7fvgF8sN9wOCybPc uZlw+WoCZpn7FpFW/XB7Y7ljkey/8AJsr4GpKDQhr3GXf9d0PM 5T9QR8z6OqRAwsFzadIZzGnd+ANL8fymcqEVgs20aFi35g3iqu f5I1C1fBLJ3lqIXHxTwReTBxfWATt7Yv1GizpyTk6aTOAukD64 ncYmjUR5FiDkJTtm9h2414kRzx1FUN4tIScBkNAfqRJgaZRCei 6xnWClsaysUfiyZtx0nw= X-UI-Out-Filterresults: notjunk:1; X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 61 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1425050702 news.xs4all.nl 2969 [2001:888:2000:d::a6]:48699 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:86574 On 02/27/2015 09:22 AM, Chris Angelico wrote: > On Sat, Feb 28, 2015 at 1:02 AM, Dave Angel wrote: >> The term "virtual memory" is used for many aspects of the modern memory >> architecture. But I presume you're using it in the sense of "running in a >> swapfile" as opposed to running in physical RAM. > > Given that this started with a quote about "you can't fake what you > ain't got", I would say that, yes, this refers to using hard disk to > provide more RAM. > > If you're trying to use the pagefile/swapfile as if it's more memory > ("I have 256MB of memory, but 10GB of swap space, so that's 10GB of > memory!"), then yes, these performance considerations are huge. But > suppose you need to run a program that's larger than your available > RAM. On MS-DOS, sometimes you'd need to work with program overlays (a > concept borrowed from older systems, but ones that I never worked on, > so I'm going back no further than DOS here). You get a *massive* > complexity hit the instant you start using them, whether your program > would have been able to fit into memory on some systems or not. Just > making it possible to have only part of your code in memory places > demands on your code that you, the programmer, have to think about. > With virtual memory, though, you just write your code as if it's all > in memory, and some of it may, at some times, be on disk. Less code to > debug = less time spent debugging. The performance question is largely > immaterial (you'll be using the disk either way), but the savings on > complexity are tremendous. And then when you do find yourself running > on a system with enough RAM? No code changes needed, and full > performance. That's where virtual memory shines. > > It's funny how the world changes, though. Back in the 90s, virtual > memory was the key. No home computer ever had enough RAM. Today? A > home-grade PC could easily have 16GB... and chances are you don't need > all of that. So we go for the opposite optimization: disk caching. > Apart from when I rebuild my "Audio-Only Frozen" project [1] and the > caches get completely blasted through, heaps and heaps of my work can > be done inside the disk cache. Hey, Sikorsky, got any files anywhere > on the hard disk matching *Pastel*.iso case insensitively? *chug chug > chug* Nope. Okay. Sikorsky, got any files matching *Pas5*.iso case > insensitively? *zip* Yeah, here it is. I didn't tell the first search > to hold all that file system data in memory; the hard drive controller > managed it all for me, and I got the performance benefit. Same as the > above: the main benefit is that this sort of thing requires zero > application code complexity. It's all done in a perfectly generic way > at a lower level. In 1973, I did manual swapping to an external 8k ramdisk. It was a box that sat on the floor and contained 8k of core memory (not semiconductor). The memory was non-volatile, so it contained the working copy of my code. Then I built a small swapper that would bring in the set of routines currently needed. My onboard RAM (semiconductor) was 1.5k, which had to hold the swapper, the code, and the data. I was writing a GPS system for shipboard use, and the final version of the code had to fit entirely in EPROM, 2k of it. But debugging EPROM code is a pain, since every small change took half an hour to make new chips. Later, I built my first PC with 512k of RAM, and usually used much of it as a ramdisk, since programs didn't use nearly that amount. -- DaveA