Skip Navigation
InitialsDiceBearhttps://github.com/dicebear/dicebearhttps://creativecommons.org/publicdomain/zero/1.0/„Initials” (https://github.com/dicebear/dicebear) by „DiceBear”, licensed under „CC0 1.0” (https://creativecommons.org/publicdomain/zero/1.0/)FU
flatbield @beehaw.org

Interests: News, Finance, Computer, Science, Tech, and Living

Posts 2
Comments 54
What's the deal with CPython, Pypy, MicroPython, Jython...?
  • Yes, there are a lot of assumptions, incorrect information, or at least miss-leading stuff out there. So I am always interested in learning more about easy and hard ways to make things better. In fact for most things I do, Python is fast enough, but sometimes it is not.

    The things I find miss-leading about what people often say about Python are that it is not that slow, and that you can always just use a library like numpy or something similar to solve speed issues. I found both to be more or less untrue in the sense of getting C like speeds. On my code, Python was indeed slow, like 1% of C speed. The surprising thing for me was using numpy helps a lot but not as much as you think. I only got to 5 to 10% of of C speed with numpy. This is because libraries are often generically compiled and to get good speed you really have to have C code that is compiled for your specific hardware with vectorization, autoparallel, and fast math at least. So generic libraries just are not going to be that fast. Another one people push is using GPUs. That also is not really very effective unless you have a very expensive card and most notably a dedicated GPU card design just for that or an array of them. The GPU performance of my workstation is significantly less then throughput of my CPU. There are hardware limitations too that are interesting. My AMD Rizen 7 based workstation would have twice the speed if I had 4 port memory rather then two port memory which is a lot more common since fully optimized code is memory IO bound at about 1/2 the CPU throughput. This must be why AMD Rizen Threadrippers seem to use 4 port memory.

    There are ways around a lot of this. For example using numba can be incredible. Similarly writing your owe C code and carefully compiling it too. The careful compile is critical. Maybe one could do the same with some stock libraries, carefully compile them. Lot of the other stuff people talk about just does not work very well in terms of speed or effort such as pypy, cython, nuitka, etc.

  • What's the deal with CPython, Pypy, MicroPython, Jython...?
  • Thanks. I love Python and have used since about 1998. The two areas where I have always found a little lacking is a) creating and app that you can actually give some one, b) computational speed when needed. So I am always interested in those two areas. A year or so ago I looked at a lot of the tools that that the article described, but there are one or two that were mentioned that are new to me. I think I will have to try when I get some time.

  • Good VPS providers providing anonymity
  • You might also just want to read their user agreement. For example, at the time several years ago now, I chose Linode over some others because I liked their agreement better. Not saying what it is now, they have been bought out, just saying that is what I did. Also was not looking for anything specifically private, Was just a solid provider with a sane agreement and a good community.

  • What's the deal with CPython, Pypy, MicroPython, Jython...?
  • For what it is worth, my take on the article. A really over whelming list. Nice read through but for those that are interested, the most useful components that were discussed were probably:

    • CPython. Of course, that is what we all use.
    • PyPy. This is an interesting acceleration if you do not need things like numpy and a lot of other common libraries. The acceleration is maybe 9X in my experience. However C code or good use of numba can often get 100X.
    • MicroPython. Not tried but seems cool if you need a really small Python. Presumably not exactly compatible because of missing libraries.
    • Pyston. Have not tried but seemed interesting from their discussion of the "pyston_lite_autoload" thing. Have no idea if it is useful.
    • Cython. Lot of hoopla about this. Good software but my experience is that you do not get much for speedup until you statically declare stuff. When I did that I got about 24X, then playing with prange and openmp features I got 75X. Not a bad speed up. However, it does not look so good when compared with writing C code or using numba. Mainly because those speedups using other methods seem to be easier to get and I got as large as 121X when using them instead. Cython is just complex to use and then does not get your full entitlement with respect to speed, or at least that was my experience.
    • Numba. Numba and Numpy used in the correct situations can give 121X speed improvements and performance similar to parallized and vectorized C code. Actually for some reason it was faster then my C code. This combo is super. Everyone should know about Numba.
    • Nuika. Very handy deployment tool. My experience same speed as CPython basically. Well I got about a 9% improvement which is almost nothing. So do not be fooled into thinking that it will give you big speed improvements. A very nice tool as part of your packaging and deployment process.

    Since I talked about C code. There are three ways to integrate C code into python: ctypes, CFFI, and using the standard C extension method. I found ctypes to be about 107X, CFFI 108X, and the standard method about 112X for my code on my hardware with code which was using autoparallel and autovectorize, fastmath, and maybe other settings. My point, the speeds of these are about the same though the standard method is just a little faster. So you can really pretty much do whichever is easier.

    Anyway my thoughts. Hope they make some sense.

  • Making Python 100x faster with less than 100 lines of Rust
  • They could probably have gotten similar results by using a combination of numpy and numba. They could also have just written a C extension which they basically did. The key is to get the final code to run both in parallel and vectorize on your exact hardware. So there are compiler flag choices too if your using C. Nice though.

  • Is there any recource for a compilation of privacy focused alternatives?
  • Do not forget https://www.privacyguides.org/ . You are in the "Privacy Guides" community after all and this link is in the side bar. This is a general answer. Maybe does not list anything for your specific client question though.

    Another one I like is https://alternativeto.net/. Not specifically privacy, but gets an alternative list for almost anything, and there are various search filters too.

  • What are your thoughts on the concept of the small web?
  • I agree. I am all for people trying other ways. The self hosting of stuff is an unsolved problem. By that I mean self hosting in a simple, cheap, secure way. FOSS makes it all possible but the effort of putting up a VPS is not for the novice and not without a lot of man-hours. One can get something like Synology NAS but that is in no way cheap. Even the VPS approach costs a fair amount once you pay the monthly costs and then pay for domains too, though it is not a lot.

  • Is there a list of all subreddit migrated to lemmy?
  • Keep in mind by in large subreddits did not migrate. There may be equivalent communities but not migration of subreddits. The big issue that Reddit has is that you do not need to migrate a community. You just need to find a similar one. Just go and use the search engine. Either the threadiverse wide one: https://browse.feddit.de/, or the one on your instance. The instance one is generally limited to communities someone on the instances has subscribed to already, but on larger instances it is pretty complete.

  • What are your thoughts on the concept of the small web?
  • I looked at the article. Seems like vaporware at the moment.

    The big issue with hosting your own stuff is configuration and security, NAT, sane email handling, bandwidth scaling, domain management, certificates, backup/restore, and issue resolution. Otherwise just build your own box somewhere. One has to make this all easy.

    The other issue is that it is pretty unrealistic to re-write all of this stuff. Much better to pull together the pieces and solve the issues.

  • Wagner Group 300 miles from Moscow
  • Relax. This is an internal matter. The issue of course is instability means more uncertainty. So do you prefer the enemy you know vs. the enemy you do not. This is why the West kind of prefers that Russia not break up.

  • Crosspost: How do kbin instances (and all aggregator protocols) work to maintain privacy and safety? What can we put up on the roadmap (when there is one)?
  • Keep in mind that there is no assumed privacy on the threadiverse. Just put your user or display name into any search engine. Everything is public. This is no different then Reddit or Usenet. If you want some privacy about all you can do is anonymous identities but your still open to textual analysis and what you say. So do not assume privacy in any deep way.

  • Question: Electric Stove Options

    We are looking at new electric stoves. Does anyone understand the options?

    Specifically wondering the types of surface units (burners). Are there various options or modes: constant current (constant heat flow), or temperature control (on/off cycling, or variable current). The old stoves were mostly constant current surface units. The new flat top stoves seem to cycle somehow (temperature controlled?). I have no idea how inductive works. We have gas now which is constant heat flow of course.

    Why I ask is I'm not very interested in this cycling stuff at all, and temperature control only.

    Thoughts, recommendations, or experiences?

    Thanks.

    0