243
u/Agent_03 Jan 02 '20 edited Jan 02 '20
A more detailed explanation:
Avoid needless processing. This breaks down two ways
Feature design: Think hard before adding features that come with significant performance impacts -- do you really need this feature? Is there a simpler way to do it which achieves most of your goals? Can you do it a simple way 90% of the time and only fall back to something more complex if needed? Can you skip several intermediate steps to get to the end result faster? (ex avoiding sorting a list)
Optimize execution by taking advantage of short-circuit evaluation and doing lazy fetching/evaluation. For conditionals, if you sometimes need to do an expensive check, but usually don't, then see if there's a way you can skip that check. Laziness: don't fetch extra things from the filesystem until requested, if you often don't need it.
Practical example: I optimized a routine (in Python) at work last month. We were processing text files a line at a time and removing control characters. To remove control characters we used a regex on each line (not the most efficient approach, fairly expensive). I added a quick check that iterated through the line of text and checked if any of the characters were within the control character range,and just returned the original string if not. Not as efficient as rolling a non-regex implementation, but since control characters are rare it avoids 90% of the performance cost and was much simpler & safer to implement.
Cache results of expensive operations to avoid repeating them unnecessarily. If you're fetching info from the filesystem, cache it in memory if you are likely to reuse it (works well with lazy evaluation).
Batch it: if you're doing a single operation often to many items, try gathering up the items to process and processing them in large groups. Often this is more efficient because it makes better use of caches (CPU/disk) and it permits you to write much tighter loops for processing. It permits reusing buffers, connections, SQL prepared statements, etc. It can improve branch prediction, permit use of SIMD instructions, etc where they would not work otherwise.
Batching also makes it easier to fall back to something like the multiprocessing library to parallelize work.
Use software pipelining. This is kind of like batching: rewrite loops that run items through a series of steps/processes so you first do the same step to each item, then the next step. Sometimes can be evaluated much more efficiently by compilers/interpreters because it allows using SIMD instructions, avoids branch prediction misses, etc.
May also mean using Unix/Linux pipelining as well: use a bunch of smaller utilities that pipe input from one to another. This is another application of the same principle, but has the extra advantage of being generally very efficient, and spreading work across multiple processors.
Use a lower-level language than Python to optimize the most performance-sensitive parts of the code. I.E. fall back to C bindings for intensive number crunching, crypto, etc. Optimized C can be several times faster than Python (or sometimes much more!). In general Pareto's principle applies: 80% of your execution time comes from 20% of the code (and vice versa), so if you double the performance of the slowest 20% you can almost double your overall performance.
69
u/EternityForest Jan 02 '20
"Do it a simple way 90% of the time and only fall back to something more complex of needed"
Now that's the right way to do simple software!
Don't just remove the feature, dynamically enable it as needed.
12
u/Agent_03 Jan 02 '20
To explain a bit further:
This is for cases where it's far more complex to replace with an optimized implementation or better algorithm that covers all the edge cases, or where there is an implementation with lower big-O complexity but a much higher constant overhead.
For example when writing a sorting algorithm you check if numbers are already sorted before trying to sort them, right? And in many languages the default implementations for sorting numbers usually use a quicksort for the bulk of it, but often switch to an insertion sort when the number of elements is small (7-10 or so). Insertion sort has worse big-O scaling but is faster for small numbers of elements.
In general, often you can write a quick and dirty brute force solution to a problem that covers all the edge cases but has poor big-O performance (for example, depth-first search of a graph). There are much, much more efficient algorithms you can apply but they usually require some assumptions about the structure of the data -- and if you know that your data violates one of these, you simply can't use them. The more optimal algorithms often require more complex data structures as well, which makes them much slower for small n values.
As an example of this, radix/bucket sort is hands-down the fastest option for large sets of smallish or fixed-length elements (say, 2-4 byte integers). But you have to be able to be able to split inputs into multiple buckets -- if you can only do comparisons for some elements then you have to be able to fall back to quicksort/mergesort etc.
Finally, if performance is bad enough that you're addressing it then simplicity takes a second priority to speed.
2
u/ManvilleJ Jan 02 '20
Finally, if performance is bad enough that you're addressing it then simplicity takes a second priority to speed.
to state this another way, Simplicity takes a back seat ONLY when performance becomes a bad enough problem.
3
u/Agent_03 Jan 02 '20
Correctness > Simplicity > Performance.
Except that in some applications a certain level of performance is part of correctness. Failing to plan for that constitutes a bug.
Simple code is often performant code as well.
1
u/EternityForest Jan 16 '20
I'd say performance is far above simplicity for a lot of applications.
If someone gave me a choice bet two similar programs, one that was 100 lines and takes five minutes, and another one that's 1000 lines but takes half that, I'm going to choose the 1000 line one every time, so long as they convince me they have correctness down.
Complexity needs justification, but it doesn't make a product crap(Unless you're main goal is to reduce attack surface for security).
Whether or not you can get correctness in a complex product with your team, tools, and deadline, for your particular application domain, is another matter.
A lot of the highest performing stuff is because of JITs, compression, prediction, etc. Simple stuff is often performant because the user does a lot of what the complex software would be doing.
17
u/Astrokiwi Jan 02 '20
For (5), this is why we use libraries like numpy, or compiled thingees like Cython.
14
u/Agent_03 Jan 02 '20
Yep, and libraries like PyTorch or PyCuda that can leverage GPU acceleration via native bindings
6
u/geeshta Jan 02 '20
Nice reply, thank you! I want to ask how would you do crypto in C? The problem I'm having is that with Python you have (almost) infinite integers and in cryptogryphy, numbers of tens to hundreds of digits (in base 10) are used. I alway wanted to rewrite my factorization/encryption/decryption libraries that I wrote in Python to C to see the performance increase but always struggled with C's MAX values for integers.
10
u/Hydroel Jan 02 '20
Are you using C's long, long long integers, or even double precision floating point numbers? I don't know the range of the variables you're using in cryptography, and you might be using numbers over 2^18; but I'm pretty sure Python relies on the same number implementation as C, so I'd be quite surprised if it could do anything that C cannot do (albeit with a simpler syntax)
17
u/geeshta Jan 02 '20 edited Jan 02 '20
The python integers don't use any C primitive type, they are objects with dynamically alocated memory, that's why they can be almost infinite, as long as you have memory available. Also that's why they are so slow. Anyway the implementation in C is beyond my understanding.
The thing is that in cryptography you would nowadays use 1024 or 2048 bit keys for encryption (RSA-1024, DH 2048) and it will probably even grow in the future. We're talking numbers 10^200 and more. In Python this is no problem but with languages with a fixed number bit-size, it is.
But maybe there are some libraries or ways to store those numbers in arrays or something.
7
u/Hydroel Jan 02 '20
That makes sense, and I didn't know that about Python! I just tried inputting using a sha1 in Python (which is unique and therefore the largest complex integer I could think of, as a matter of fact in the 2159), and it is indeed completely straightforward. Thank you for your short explanation.
After looking around (very shortly, I must say), you're not the only one with that issue, and GMP seems to be the preferred choice for cryptography in C.
cryptography you would nowadays use 1024 or 2056 bit keys
That would be 2048, not 2056, wouldn't it?
1
u/geeshta Jan 02 '20
Oh yes, fixed, I mixed it with 256. And thank you for your advice, the library looks promising, I haven't actually done any research on that yet.
4
u/AntMan5421 Jan 02 '20
Hey, I'm not OP nor experienced programmer in C.
You might want look into bitsets and arrays of integers.
Here are some potentially helpful links:
https://stackoverflow.com/questions/4372515/how-to-implement-a-bitset-in-c
3
u/TheBlackCat13 Jan 02 '20
CPython uses C 32-bit integers behind-the-scenes if the value is between -230 and 230. It only falls back to dynamically allocated sizes if the number exceeds that size. You can see more details here. The C API has access to the underlying C integer if it is available and can use fast code paths to optimize calculations using them.
1
u/fireflash38 Jan 02 '20
The thing is that in cryptography you would nowadays use 1024 or 2048 bit keys for encryption (RSA-1024, DH 2048) and it will probably even grow in the future. We're talking numbers 10200 and more. In Python this is no problem but with languages with a fixed number bit-size, it is.
Ehhh, not likely to grow in the future. 2 or 4k is large enough, and 8k is overkill. And if you can break 4k, you can break 8k.
Most things should be doing ECDHE anyways for forward secrecy. Once you get into quantum though, that's a whole different set of problems.
0
u/DiggV4Sucks Jan 02 '20
In Python this is no problem but with languages with a fixed number bit-size, it is.
It's not a problem? Why would it be a problem? Do you think that Python is implemented on machines with unlimited bit-sizes? Couldn't you duplicate the Python's integer implementation in any language?
I mean really... Do you think that there is no crypto implementation in C?
2
u/TheBlackCat13 Jan 02 '20
Never used floating point numbers when you need the number to be exactly correct. A lot of weird things can happen with them in often unexpected ways.
5
u/AngriestSCV Jan 02 '20
You are looking for what is known for as an arbitrary precision library.
Here is an example https://gmplib.org/
The macros MAX_INT, MAX_LONG ... etc will let you know at compile time how big your integers are. There is also uin32_t and it's friends that let you specify exactly what kind of integer you want.
1
3
u/fireflash38 Jan 02 '20
And unless you're doing it for educational reasons, I wouldn't roll your own crypto, there's a billion pitfalls.
1
u/geeshta Jan 03 '20
Thank you that looks very useful. I'm not rolling it anywhere, i really is for educational reasons.
1
u/ak217 Jan 02 '20
The first rule of crypto is to not do your own crypto (unless you're just trying to learn).
Use libraries rolled by the pros. https://github.com/pyca/cryptography and https://github.com/wbond/oscrypto are a good start. Even they get plenty of things wrong, but when they do, they will alert you. If you can't commit the level of support those authors do, then you can't afford to roll your own crypto.
4
u/Isvara Jan 02 '20
If you're fetching info from the filesystem, cache it in memory if you are likely to reuse it
Why isn't it better to leave this to the operating system, which has better whole-system view?
4
u/Agent_03 Jan 02 '20
Often it is, if you just want the raw bytes. If you're doing some sort of analysis on the data it's more efficient to cache the result yourself though, or if your program knows more about the access pattern.
4
u/Fourgot Anaconda3 science-like Jan 02 '20
Why isn't it better to leave this to the operating system, which has better whole-system view?
It can be, if the particular constraint is memory. If the bottleneck is actually IO, then leaving the data in memory prevents repetitive expensive reads.
1
u/AngriestSCV Jan 02 '20
The os dosn't know your application. For instance if you do an expensive db query that can be slightly out of date and still useful you might want to return that value multiple times. The OS can't know what you are asking of the db. The db might be able to be configured to cache the result as you need it, but that isn't automatic.
4
Jan 02 '20
Thanks for your post. As a hobbist, learning things that are probably common knowledge to you is extremely useful!
2
2
u/Zegrento7 Jan 03 '20
For (4), here's an example: Let's say there's 1001 items that need to be processed with an 8-step task. Each step takes one second to complete.
Without pipelining, an item needs to pass through all steps before the next item can be processed, so the last item needs to wait 8000 seconds before it can be processed.
With pipelining, once the first step finishes processing an item, it passes it to the next step then starts working of the next item while the next step is working on the previous item. This means that a new item enters the first step every second, so the last item only has to wait 1000 seconds before being processed. An 8x speedup.
1
1
u/abeardednerd Jan 02 '20
is it okay that i don't understand any of this ? or am i just dumb !
4
u/Agent_03 Jan 02 '20
No, you're not dumb -- a lot of these things you only need to worry about when running performance sensitive code or production code at a fairly large scale.
For 90% of things, performance isn't a critical consideration as long as you use standard libraries.
2
2
u/sibswagl Jan 05 '20
I'll try to define as many of the more complex terms as possible. And like Agent_03 said, this is fairly complex stuff. There's a scareword in programming called "premature optimization" -- basically, write simple and correct code first. Then, if the speed is actually negatively affecting the product, add complicated stuff like caching and batching. A lot of the time you won't need to.
short-circuit evaluation: Boolean operators (eg.
&&and||) perform what's known as short-circuiting, wherein they only evaluate as much of an expression as necessary. For example, if you haveA && Band A evaluates to false, then you can skip checking B (because regardless of its value,false && Bis false). Therefore, you can structure your expressions so the more expensive values are evaluated last. If A takes 50 seconds to compute and B takes only 5, you should doB && A.lazy fetching/evaluation: Pretty much what it says on the tin. A lot of times programmers will over allocate or over fetch to be on the safe side, eg. creating an array of 10000 objects and instatiating all of them. This is safer because if you access any index in the array, you know the object exists. However, it's also slower if, on average, you only access 100 of the objects. It's faster to instatiate each object the first time it is used, so you aren't doing uncessary work.
Caching: Fairly simple in concept (save the results of previous operations), but can be tricky in practice. There's a lot of stuff to read on caching, if you're interested.
In addition to manual caches (ie. you create and maintain it), there are also system level caches for retrieved memory. Because memory is retrieved in chunks (which are then stored in the cache), if you can ensure as much of your data is on the same chunk as possible (instead of spread across multiple), this helps speed up your code. A cache miss is when something is no longer in the cache, so the computer has to retrieve the memory again (much slower); keeping your data close together helps avoid this.
Branch prediction: Compilers and processors like to try and guess what your program is going to do. If you have a condition inside a loop that evaluates to false 90% of the time, this time it is probably also going to be false. Therefore, the computer can "skip" some work to help speed things up. Similarly to cache misses, branch prediction misses are when the compiler/processor guesses wrong and has to slow down to do some makeup work.
SIMD instructions: (I think) these are a type of machine level instruction that use parallelism to speed up work
1
u/scatters Jan 02 '20
For 1.2.1, were you really iterating through the line character by character? I'd have thought that using a precompiled regex search for control characters would be fastest since that can be heavily optimized.
2
u/Agent_03 Jan 02 '20 edited Jan 03 '20
Yes, really. Regexes use state machines internally and can have some surprising complexity and performance characteristics. Stack overflow had an outage due to one regex issue.
For very simple operations (such as this one, where I just had to look at character codepoints and see if they fall in a couple ranges) the performance improvement from this change alone was substantial: for one dataset of several GB it cut a 15 minute process to about 13 minutes (there was a lot of other processing happening, so that was excellent for a single change).
Given we process a lot more data than the sample set, I expect considerable cost and time savings overall.
In general, regexes are great for more complex patterns but direct string operations are much faster for trivial cases. Unless you're processing multiple GB of text (I was) the difference probably won't matter to you, though.
Also when it comes to performance, always always always use a profiler to figure out which part is slow -- that's how I found this optimization.
Edit: Typos -- this is why you don't reddit on mobile, sigh.
0
85
Jan 02 '20
Can someone please explain?
224
u/SwampFalc Jan 02 '20 edited Jan 02 '20
The way I read it (which might be wrong) is that, if you have a performance issue, you should try the following fixes in order (ie. try one and if that doesn't solve it, go to the next possible fix):
Just don't do whatever you're trying to do. IOW ask yourself if it's really necessary/useful/something you might lose a client over.
Cache the results of previous calls. Maybe you can reuse them as-is, or partially.
Do a large number of calls in batch, maybe in advance or later, outside of peak operating hours. Or perhaps you need to set up a network connection to do what you're doing, if that takes a while then don't make a new connection for each request, bundle up a dozen and setup once.
Don't add your stuff to an existing program, create a new and separate one that will take the output of a previous process. Decoupling, in a way.
If none of that works, only then should you look for a totally different way of doing it.
69
u/Agent_03 Jan 02 '20
There's multiple explanations for these, which makes them deeper than they seem, but there's a couple more parts:
Not doing work may include several ways of avoiding extra computation -- lazily running expensive operations if not always needed, adding conditional checks before complex work rather than throwing exceptions, using short-circuit evaluation, or using more efficient algorithms / cutting out intermediate steps if you can get a result without them.
Yep.
Yep, but it doesn't necessarily have to wait hours -- batches of work can be handed off to other processes or utilities to process (makes better use of cores), and often you can write tighter loops that make better use of caches and reuse resources (connections, buffers, etc)
That's Unix pipelining, and it's good shit, but software pipelining is a more general version of the technique. Depending on your architecture one or the other may be more efficient -- goes well with batching above though.
No, this is a reference to falling back on C bindings invoked from Python, and writing the really tricky bits highly optimized in a lower-level language. C can be several times as fast as Python (or more, with good use of SIMD instructions) if written efficiently.
They didn't do this often at Dropbox, because Python is faster to write and easier to maintain, but when they did this they got huge speedups.
Hope this helps -- I swear I saw a talk the Dropbox folks gave on Python performance some years ago.
22
u/WikiTextBot Jan 02 '20
Software pipelining
In computer science, software pipelining is a technique used to optimize loops, in a manner that parallels hardware pipelining. Software pipelining is a type of out-of-order execution, except that the reordering is done by a compiler (or in the case of hand written assembly code, by the programmer) instead of the processor. Some computer architectures have explicit support for software pipelining, notably Intel's IA-64 architecture.
It is important to distinguish software pipelining, which is a target code technique for overlapping loop iterations, from modulo scheduling, the currently most effective known compiler technique for generating software pipelined loops.
[ ^PM | Exclude ^me | Exclude from ^subreddit | FAQ / ^Information | ^Source ] Downvote to remove | v0.28
3
u/SwampFalc Jan 02 '20
I think that all 5 of these are very pithy descriptions of a wide range of techniques. For Dropbox specifially, #5 probably does mean going to C, but in any other environment this could easily mean using the GPU instead of the CPU, or maybe even to some other dedicated hardware. Which is why I tried to remain deliberately vague.
26
u/munificent Jan 02 '20
IOW ask yourself if it's really necessary/useful/something you might lose a client over.
No, it's at a lower level than that. It means don't spend CPU cycles doing unnecessary work. For example, say you need to find the greatest element in a list. You could sort the whole list and then pull the last element out. But sorting the entire list is more work than you need to do (it's O(n log n)). Simply find the max element and stop.
19
u/davvblack Jan 02 '20
Both interpretations are correct.
0
Jan 02 '20
[deleted]
1
u/davvblack Jan 02 '20
But from a product design perspective (eg "something you might lose a client over") it's always worth asking if it's even worth building a given feature. It always adds complexity and maintenance cost to your project, and doesn't always add value.
1
u/mipadi Jan 02 '20
Don't add your stuff to an existing program, create a new and separate one that will take the output of a previous process. Decoupling, in a way.
I believe they are using "pipeline" in the CPU sense; i.e., if you have a multi-stage process that uses separate resources, overlap stages from multiple runs of the pipeline to increase throughput.
16
u/thescottjr Jan 02 '20
Im glad i'm not the only one who doesn't get it
51
u/feelings_arent_facts Jan 02 '20
If you need to optimize something for performance, the best thing to do is not do it at all. Basically rearchitecture it so that you don't need that logic anymore.
Python is notoriously slow so if you're going for performance, use C++ or C.
3
3
Jan 02 '20
How about 2,3,4?
26
u/Poromenos Jan 02 '20
Caching is doing it once and storing the result so it's faster in subsequent steps. Batching means doing many together instead of one at a time. Pipelining means splitting it up into steps so some of those can run in parallel instead of only starting one after the previous one is complete.
1
u/ericonr Jan 02 '20
Or Rust, or Go, or Java if you can wait for the start-up time, or D (which I believe Dropbox does use). Lots of options :)
25
3
u/feelings_arent_facts Jan 02 '20
I need something more meme worthy. How about Nim? I hear that's new
2
2
1
u/i9srpeg Jan 02 '20
Java if you can wait for the start-up time
JVM startup times should be around 90ms, which is usually OK unless you start and tear down the JVM for each operation.
1
u/ericonr Jan 02 '20
Is it that short? Java applications usually take much longer to launch for me than usual Python stuff.
3
u/i9srpeg Jan 02 '20
This article has some benchmarks: http://macias.info/entry/201912201300_graal_aot.md
I was surprised too when I saw JVM startup times so low. Most of the perceived slowness probably comes from the heavy, over-engineered frameworks which are commonly used in the Java world.
Quarkus seems like an interesting project. It starts up a REST API server in under 1 second when running on the JVM, and it fully supports GraalVM, which lets you generate a native binary that can boot in 0.016s. This is faster than Django startup times in my current project, but I don't know how the Java numbers would change for an application more complex than an hello world.
4
Jan 02 '20
If you're a performance engineer, there are a couple of steps to follow:
Don't be a perf engineer. What are you even doing? This is an awful job.
If you've made it this far, just make sure you cache everything to save loads on your server
Also batch the flying fuck out of your requests to cut down on constant streams
Pipelines!
If you've come this far, you are truly desperate: make sure you don't use Python.
That's how I've always looked at it anyway. Source: I was a perf engineer for a summer and should have listened to rule 1.
1
u/Bluestrm Jan 02 '20
What didn't you like about performance engineering? I'm not a full time performance engineer, but performance optimization is definitely one of my favorite types of work.
1
u/Agent_03 Jan 02 '20
I added what I think is a fairly canonical explanation of these rules as a new top-level comment.
They're kind of vague, and there's a couple interpretations.
46
u/nfojones Jan 02 '20
Ouch this gives me flashbacks of 2018 when I spent a year of my career performance tuning and refactoring a multifaceted data streaming application written in Python 2 that was running on the same box as the resource hungry Apache Flume agents it was feeding.
I managed some refactor miracles that year but the data we were consuming gave no fucks and kept scaling its way back to a bottleneck.
Started as a single threaded app that shift to a multithreading app and evolved into a multiprocessing stack that utilized ZMQ to talk between processes (I don't even know why I did that anymore). I learned an epic butt ton about Python that year but I'd prefer never to chase that problem again.
And of course this was a Fortune 500 megacorp that chose to lay me off in early 2019 because I fell into some arbitrary "doesn't work near a core location" layoff net (due to having convinced my boss to move across the country and keep the job). My boss and colleagues were shocked. For me though it was almost perfect timing. I'd done FT remote for almost 2 years and even though I was starting to come into a local office just to be around people I was definitely just coasting and that office had zero relation to my work. The chunky severance they gave me and the 60 days to find a new job worked perfectly. Got something like a 33% raise out of the new gig and the severance check arrived just as I was buying my first house.
Good times... feel bad for whoever had to pick that project up. I knew it like the back of my hand. One of those rare projects you actually built from the ground up one design mistake after another. At least it was well linted and relatively clean/sexy code with decent doc strings. And FWIW, it had finally made it to Python 3 just as I was leaving, having originally been confined to the RHEL Python 2.6 variant in its earliest days.
Sorry for the blog post. Sometimes I just leave these missives on Reddit for myself like a poor man's journal.
TLDR: I fucking love Python. Please never make me do realtime mission critical streaming with it again.
13
Jan 02 '20
These kinds of long comments are why I love reddit, don't apologize for giving us quality content.
0
Jan 02 '20
[deleted]
1
u/nfojones Jan 02 '20
Hey thanks. Just remember, what doesn't kill us makes us stronger. The know-how I gained was definitely worth it.
Forgot to mention I profiled the heck out of every dang step in the pipeline eventually trying to see where things were slowing down and realized eventually when you have competing processes on a box, figuring out exactly where the bottlenecks are coming from is like pinning jelly to a wall. Ultimately it helped but it was never 100% indicative of the root causes for the slow downs just that "yes here it is expanding and contracting its performance". Presumably classic fallout from variable pipeline throughput causing resource exhaustion. Reading incoming data slows down as your output runs into bottlenecks and so on and so forth. Ripple effects. Go figure, many of the water analogies around streaming data really do make sense.
My internal name for this project was Tsunami Surfer. When it started it was a tongue-in-cheek name but by the end it seemed relatively apt.
Good luck with your project! May you one day leave it to some hapless new hire, as is tradition.
PS. I also eventually migrated some of the pipelines to run on PyPy. That was probably the biggest single performance boost I got but had issues applying it to all the possible pipelines the codebase supported because getting your whole module stack to work with PyPy and your env can be a battle of its own.
7
u/MarsupialMole Jan 02 '20
How would you go about pipelining something in python ordinarily? I know of lots of pipeline type frameworks but not sure what would be my go to for arbitrary performance improvements within an existing application.
6
2
u/nevus_bock Jan 02 '20
I remember you. You’re just a troll who shits on Python for some reason. Last time you were plugging Lua; still on it?
-2
u/stefantalpalaru Jan 02 '20
Last time you were plugging Lua
You don't remember me.
You’re just a troll who shits on Python for some reason.
I'm just an experienced programmer and the current Tauthon maintainer. Who the fuck are you, down there in the peanut gallery?
2
u/nevus_bock Jan 02 '20
Yeah, you haven’t changed. Still a condescending douche. Good luck with python 2, Mr. “experienced programmer”.
-2
u/stefantalpalaru Jan 02 '20
Still a condescending douche.
Show me your code, you silly muppet!
2
5
u/nuephelkystikon Jan 02 '20
I read it as ‘The rules of Perl’ first, which made the Python part a bit weird.
7
u/gitcraw Jan 02 '20
I was thinking "Performance Review" like corporate bullshit of bragging about yourself every 6 months to tell people whose job it is to keep track of you, what you're actually doing.
3
0
Jan 02 '20
[deleted]
8
u/synae Jan 02 '20
The only thing worse than working some place with performance reviews like that is working at a place without performance reviews.
Yes, they suck, but it's the easiest path to a raise/promotion if you don't want to job-hop every year.
3
2
2
u/wildcarde815 Jan 02 '20
leaves out 'if you can make this work in osx and windows but not linux, that's fine abandon linux'.
3
1
u/FlukyS Jan 02 '20
Actually you can do it in python just make sure you break GIL. Worst case rewrite parts of it
1
0
u/ManvilleJ Jan 02 '20
You know its funny, I hear it all over "python is has really bad performance". Then you hear the instagram story, then people talk about developer time cost, then people talk about the cost of computing and distributed computing. Somehow some java developer hops in to complain about white space and a lone cobalt developer start muttering about the good old days in his rocking chair.
The reality is, Each language is a good tool until it isn't. Usually, python is a good tool, but when it isn't, python is pretty good at bringing in the tool that is good at the job.
137
u/ZombieRandySavage Jan 02 '20
TL;DR. Really wish we hadn’t written the core application of our business in Python.